Skip to content

fix: correct JSON escaping in Tuta additionalSettings#1435

Open
pratham-jaiswal wants to merge 1 commit into
ImranR98:mainfrom
pratham-jaiswal:fix/tuta-additionalsettings-json-escape
Open

fix: correct JSON escaping in Tuta additionalSettings#1435
pratham-jaiswal wants to merge 1 commit into
ImranR98:mainfrom
pratham-jaiswal:fix/tuta-additionalsettings-json-escape

Conversation

@pratham-jaiswal
Copy link
Copy Markdown

This fixes the additionalSettings JSON for the Tuta config (de.tutao.tutanota.json)

The previous value used invalid escaping for the regex in versionExtractionRegEx, which caused:

SyntaxError: Bad escaped character in JSON

This was breaking the build pipeline when buildData.js attempted to parse the generated config.

Root cause

The regex used \d directly inside a JSON string. Since additionalSettings itself is a stringified JSON object, the backslashes needed to be escaped twice.

Changes

  • Corrected escaping for versionExtractionRegEx
  • Ensured the config parses correctly through JSON.parse

Verification

Tested locally:

  • node buildData.js now runs successfully
  • Used the generated obtainium://app/... payload from “Add to Obtainium”
  • Transferred to Android and imported successfully
  • Correct app version is detected and displayed
  • APK downloads and installs correctly

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

Successfully merging this pull request may close these issues.

1 participant