mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed regression bug with combination of splitStrings and renameProperties option
https://github.com/javascript-obfuscator/javascript-obfuscator/issues/729
(cherry picked from commit a0dca0256b)
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
Change Log
|
||||
|
||||
v1.12.1
|
||||
---
|
||||
* Fixed regression bug with combination of `splitStrings` and `renameProperties` option. https://github.com/javascript-obfuscator/javascript-obfuscator/issues/729
|
||||
|
||||
v1.12.0
|
||||
---
|
||||
* **New option:** `optionsPreset` allows to set options preset
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -217,12 +217,11 @@ export class JavaScriptObfuscator implements IJavaScriptObfuscator {
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.ControlFlowFlattening);
|
||||
}
|
||||
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.Converting);
|
||||
|
||||
if (this.options.renameProperties) {
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.RenameProperties);
|
||||
}
|
||||
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.Converting);
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.RenameIdentifiers);
|
||||
astTree = this.runNodeTransformationStage(astTree, NodeTransformationStage.StringArray);
|
||||
|
||||
|
||||
+6
-1
@@ -294,7 +294,12 @@ describe('RenamePropertiesTransformer', () => {
|
||||
});
|
||||
|
||||
describe('Variant #8: integration with `splitStrings` option', () => {
|
||||
const propertyRegExp: RegExp = /'a': *'long' *\+ *'Prop' *\+ *'erty' *\+ *'Valu' *\+ *'e'/;
|
||||
const propertyRegExp: RegExp = new RegExp(
|
||||
'const foo *= *{' +
|
||||
'\'a\': *\'long\' *\\+ *\'Prop\' *\\+ *\'erty\' *\\+ *\'Valu\' *\\+ *\'e\'' +
|
||||
'};' +
|
||||
'foo\\[\'a\'];'
|
||||
);
|
||||
|
||||
let obfuscatedCode: string;
|
||||
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
const foo = {
|
||||
longPropertyName: 'longPropertyValue'
|
||||
};
|
||||
foo.longPropertyName;
|
||||
|
||||
Reference in New Issue
Block a user