javascript-obfuscator / javascript-obfuscator-ui

A web UI to the JavaScript Obfuscator node.js package.
https://obfuscator.io
BSD 2-Clause "Simplified" License
230 stars 130 forks source link

Fixed sanitizing of persisted options #80

Closed relative closed 1 year ago

relative commented 2 years ago

Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1069

relative commented 1 year ago
From 279c7fe5e4d302527a4123e96c6c77280956fb39 Mon Sep 17 00:00:00 2001
From: relative <hi@relative.im>
Date: Sun, 27 Feb 2022 14:29:52 -0500
Subject: [PATCH] Fixed sanitizing of persisted options

---
 App/reducers/options.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/App/reducers/options.js b/App/reducers/options.js
index 186eb42..e93f4cc 100644
--- a/App/reducers/options.js
+++ b/App/reducers/options.js
@@ -524,8 +524,8 @@ export function sanitizePersistedOptions(persistedOptions) {
         for (const value of persistedOptions.stringArrayEncoding) {
             if (
                 value !== STRING_ARRAY_ENCODING_NONE
-                || value !== STRING_ARRAY_ENCODING_BASE64
-                || value !== STRING_ARRAY_ENCODING_RC4
+                && value !== STRING_ARRAY_ENCODING_BASE64
+                && value !== STRING_ARRAY_ENCODING_RC4
             ) {
                 persistedOptions.stringArrayEncoding = initialState.stringArrayEncoding;