Skip to content

Commit

Permalink
Removed .
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimck committed Feb 7, 2025
1 parent 719f6d0 commit ce46de5
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .changeset/short-rules-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ima/react-page-renderer": major
"@ima/server": major
"@ima/core": major
---

Removed $IMA.$Path without any replacements since it imposed security riscs
2 changes: 0 additions & 2 deletions packages/core/src/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export type BootSettings = Pick<
| '$Protocol'
| '$Language'
| '$Host'
| '$Path'
| '$Root'
| '$LanguagePartPath'
>;
Expand All @@ -102,7 +101,6 @@ export interface BootServices {
router: {
$Protocol: GlobalImaObject['$Protocol'];
$Host: GlobalImaObject['$Host'];
$Path: GlobalImaObject['$Path'];
$Root: GlobalImaObject['$Root'];
$LanguagePartPath: GlobalImaObject['$LanguagePartPath'];
};
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ export function getClientBootConfig(
router: {
$Protocol: $IMA.$Protocol,
$Host: $IMA.$Host,
$Path: $IMA.$Path,
$Root: $IMA.$Root,
$LanguagePartPath: $IMA.$LanguagePartPath,
},
Expand All @@ -237,7 +236,6 @@ export function getClientBootConfig(
$Protocol: $IMA.$Protocol,
$Language: $IMA.$Language,
$Host: $IMA.$Host,
$Path: $IMA.$Path,
$Root: $IMA.$Root,
$LanguagePartPath: $IMA.$LanguagePartPath,
},
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export interface GlobalImaObject {
$Debug: boolean;
$Protocol: 'http:' | 'https:';
$Host: string;
$Path: string;
$Root: string;
$LanguagePartPath: string;
Runner: object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const settings = {
$Host: undefined,
$Language: undefined,
$LanguagePartPath: undefined,
$Path: undefined,
$Page: {
$Render: {
documentView: DocumentView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const settings = {
$Host: undefined,
$Language: undefined,
$LanguagePartPath: undefined,
$Path: undefined,
$Page: {
$Render: {
documentView: DocumentView,
Expand Down
12 changes: 1 addition & 11 deletions packages/server/lib/factory/IMAInternalFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,13 @@ module.exports = function IMAInternalFactory({
}

const dummyApp = serverGlobal.get(GLOBAL.DUMMY_APP);
const {
protocol,
host,
path: urlPath,
root,
languagePartPath,
} = res.locals;
const { protocol, host, root, languagePartPath } = res.locals;

dummyApp.oc.get('$Request').init(req);
dummyApp.oc.get('$Response').init(res);
dummyApp.oc.get('$Router').init({
$Protocol: protocol,
$Host: host,
$Path: urlPath,
$Root: root,
$LanguagePartPath: languagePartPath,
});
Expand Down Expand Up @@ -177,7 +170,6 @@ module.exports = function IMAInternalFactory({
let languagePartPath = res.locals.languagePartPath;
let host = res.locals.host;
let root = res.locals.root;
let urlPath = res.locals.path;
let protocol = res.locals.protocol;

let dictionary = language ? languageLoader(language) : {};
Expand All @@ -194,7 +186,6 @@ module.exports = function IMAInternalFactory({
router: {
$Protocol: protocol,
$Host: host,
$Path: urlPath,
$Root: root,
$LanguagePartPath: languagePartPath,
},
Expand All @@ -208,7 +199,6 @@ module.exports = function IMAInternalFactory({
$Protocol: protocol,
$Language: language,
$Host: host,
$Path: urlPath,
$Root: root,
$LanguagePartPath: languagePartPath,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ exports[`responseUtilsFactory createContentVariables should generate base set of
$IMA.$App = undefined;
$IMA.$Protocol = "undefined";
$IMA.$Host = "undefined";
$IMA.$Path = "undefined";
$IMA.$Root = "undefined";
$IMA.$LanguagePartPath = "undefined";
})(typeof window !== 'undefined' && window !== null ? window : global);
Expand All @@ -431,7 +430,6 @@ exports[`responseUtilsFactory processContent should allow overrides through cust
$IMA.$App = undefined;
$IMA.$Protocol = "undefined";
$IMA.$Host = "undefined";
$IMA.$Path = "undefined";
$IMA.$Root = "undefined";
$IMA.$LanguagePartPath = "undefined";
})(typeof window !== 'undefined' && window !== null ? window : global);
Expand All @@ -452,7 +450,6 @@ exports[`responseUtilsFactory processContent should interpolate revival scripts
$IMA.$App = undefined;
$IMA.$Protocol = "undefined";
$IMA.$Host = "undefined";
$IMA.$Path = "undefined";
$IMA.$Root = "undefined";
$IMA.$LanguagePartPath = "undefined";
})(typeof window !== 'undefined' && window !== null ? window : global);
Expand Down
1 change: 0 additions & 1 deletion packages/server/lib/factory/responseUtilsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ module.exports = function responseUtilsFactory({ applicationFolder }) {
settings.$Protocol && encodeHTMLEntities(settings.$Protocol)
}";
$IMA.$Host = "${settings.$Host && encodeHTMLEntities(settings.$Host)}";
$IMA.$Path = "${settings.$Path && encodeHTMLEntities(settings.$Path)}";
$IMA.$Root = "${settings.$Root && encodeHTMLEntities(settings.$Root)}";
$IMA.$LanguagePartPath = "${
settings.$LanguagePartPath &&
Expand Down

0 comments on commit ce46de5

Please sign in to comment.