X Tutup
Skip to content

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

@JakubHlavacek

Description

@JakubHlavacek

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,}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup