Skip to content
New issue

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

minified return statement is not obfuscated correctly when transformObjectKeys is true #1246

Open
JakubHlavacek opened this issue Apr 11, 2024 · 0 comments

Comments

@JakubHlavacek
Copy link

JakubHlavacek commented Apr 11, 2024

Minimal working example that will help to reproduce issue

function compOk(ys) {
  const min = Infinity;
  function aux(y) {
      if (y < min) min = y;
  }
  aux(ys);
  return { min, }
}

function compErr(ys){
  const min = Infinity;
  function aux(y) {
      if (y < min) min = y;
  }
  return aux(ys),{ min, }
}

Expected Behavior

function compOk do this (after webcrack)

function compOk(a) {
  const b = Infinity;
  function c(a) {
    if (a < b) b = a;
  }
  c(a);
  const d = {
    min: b
  };
  return d;
}

Current Behavior

function compErr do this (after webcrack)

function compErr(a) {
  const b = Infinity;
  function c(a) {
    if (a < b) b = a;
  }
  const d = {
    min: b
  };
  c(a);
  return d;
}

Your Environment

  • Obfuscator version used: 4.1.0
  • Node version used: 18.12.1
  • obfuscator settings: { optionsPreset: "low-obfuscation", transformObjectKeys: true,}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant