We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.apply(...) is not converted to ['apply'](...)
.apply(...)
['apply'](...)
.apply(...) is converted to ['apply'](...) and gives undefined
When i obfuscate my main.js file with this configuration (minimal obfuscation)
{ "compact": false, "controlFlowFlattening": false, "controlFlowFlatteningThreshold": 0.75, "deadCodeInjection": false, "deadCodeInjectionThreshold": 0, "debugProtection": false, "debugProtectionInterval": 0, "disableConsoleOutput": false, "domainLock": [], "domainLockRedirectUrl": "about:blank", "forceTransformStrings": [], "identifierNamesCache": {}, "identifierNamesGenerator": "mangled-shuffled", "identifiersDictionary": [], "identifiersPrefix": "", "ignoreRequireImports": true, "inputFileName": "", "log": false, "numbersToExpressions": false, "optionsPreset": "default", "renameGlobals": false, "renameProperties": false, "renamePropertiesMode": "safe", "reservedNames": [ "webpackJsonp" ], "reservedStrings": [ "webpackJsonp" ], "seed": 1, "selfDefending": false, "simplify": false, "sourceMap": false, "sourceMapBaseUrl": "", "sourceMapFileName": "", "sourceMapMode": "separate", "sourceMapSourcesMode": "sources-content", "splitStrings": false, "splitStringsChunkLength": 5, "stringArray": false, "stringArrayCallsTransform": false, "stringArrayEncoding": [], "stringArrayIndexesType": [ "hexadecimal-number" ], "stringArrayIndexShift": false, "stringArrayRotate": false, "stringArrayShuffle": false, "stringArrayWrappersCount": 1, "stringArrayWrappersChainedCalls": false, "stringArrayWrappersParametersMaxCount": 2, "stringArrayWrappersType": "variable", "stringArrayThreshold": 0.75, "target": "browser", "transformObjectKeys": false, "unicodeEscapeSequence": false }
Gives me errors about undefined variables, when trying to minify an es5 class that inherits and calls the constructor
Real example:
inside a node module in my project, i got this es5 code that is later embedded in my main.js that will be obfuscated
main.js
var MyConfigService = /** @class */ (function (_super) { tslib_1.__extends(MyConfigService, _super); function MyConfigService() { return _super !== null && _super.apply(this, arguments) || this; } MyConfigService = tslib_1.__decorate([ Injectable() ], MyConfigService); return MyConfigService; }(ConfigService)); export { MyConfigService };
this code gets transpiled by the angular pipeline and minified with uglify-js to
j = (function (o) { function e() { return (null !== o && o.apply(this, arguments)) || this; } return Object(t.d)(e, o), (e = Object(t.c)([Object(r.B)()], e)); })(a.c)
Then i apply javascript-obfuscator and the code is converted to:
Uo = function (p8) { function p9() { return null !== p8 && p8['apply'](this, arguments) || this; } return Object(U4['d'])(p9, p8), p9 = Object(U4['c'])([Object(U5['B'])()], p9); }(UU['c'])
If i replace ['apply'] with .apply the code starts working again!
Is it possible to disable the transformation of some keywords (for example apply)?
apply
i'm not able to post the code since it's under NDA, but i provided a clear example of what happens above
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
.apply(...)
is not converted to['apply'](...)
Current Behavior
.apply(...)
is converted to['apply'](...)
and gives undefinedWhat is happening
When i obfuscate my main.js file with this configuration (minimal obfuscation)
Gives me errors about undefined variables, when trying to minify an es5 class that inherits and calls the constructor
Real example:
inside a node module in my project, i got this es5 code that is later embedded in my
main.js
that will be obfuscatedthis code gets transpiled by the angular pipeline and minified with uglify-js to
Then i apply javascript-obfuscator and the code is converted to:
If i replace ['apply'] with .apply the code starts working again!
My question
Is it possible to disable the transformation of some keywords (for example
apply
)?Steps to Reproduce
i'm not able to post the code since it's under NDA, but i provided a clear example of what happens above
Your Environment
4.1.0
14.17.0
The text was updated successfully, but these errors were encountered: