The Plugin-Store StoreCode can contain credentials that are considered to be sensitive and should not be shared with third parties.
This change adds a unique prefix that serves as a warning to prevent users from unintentionally sharing these credentials with others.
In addition, this unique prefix makes it possible to block this string from appearing in messages using the censorship feature.
const value = codeInput.value.trim();
let isValid = false;
- if (value.length > 0) {
- const decodedValue = window.atob(value);
+ if (value.startsWith("WoltLab_StoreCode_Do_Not_Share_")) {
+ const decodedValue = window.atob(value.replace(/^WoltLab_StoreCode_Do_Not_Share_/, ""));
let maybeJson: unknown;
try {
function detectCode() {
const value = codeInput.value.trim();
let isValid = false;
- if (value.length > 0) {
- const decodedValue = window.atob(value);
+ if (value.startsWith("WoltLab_StoreCode_Do_Not_Share_")) {
+ const decodedValue = window.atob(value.replace(/^WoltLab_StoreCode_Do_Not_Share_/, ""));
let maybeJson;
try {
maybeJson = JSON.parse(decodedValue);