Skip to content

Conversation

@false-fox
Copy link

@false-fox false-fox commented May 22, 2024

Fixes #630, #559 and possibly a fix to #581, #615, #617, #575, #560, #557, #496 and many other frustrated users.

Many of these 401 error issues seem to be linked, or at least some of them are caused by the autofill browser problem. My pullrequest fixes this by:

  1. Changing the input element to a text input element (as compared to a password)
  2. Adding CSS to obfuscate it visually.

@officialasishkumar
Copy link

officialasishkumar commented May 24, 2024

@victornpb if this fixes this issue Error searching messages, API responded with status 401!, can you merge it?

@ptraced
Copy link

ptraced commented May 29, 2024

@victornpb if this fixes this issue Error searching messages, API responded with status 401!, can you merge it?

Its abandoned (1 Year since last update) we need someone to fork and merge all PR's sadly idk if anyone will

@officialasishkumar
Copy link

Hey @thevisual I can host it, but will need a reviewer for PRs.

@gaveitatry2
Copy link

@victornpb - One of my rich, hot, OnlyFans female model friends wants to donate $10,000 to you if you can merge this autofill fix that false-fox took the time to create. Ha ha. Don't get mad. I was just checking to see if you are still around.

@false-fox
Copy link
Author

false-fox commented Jul 26, 2024

so sad this has been abandoned. i'm too lazy to maintain a fork, i hope victor will come back :p

@victornpb victornpb added PR looks good Looks like it's good for merging (maybe be in the next release) PR needs adjusting labels Mar 9, 2025
@testing765
Copy link

testing765 commented Mar 15, 2025

Just tried it but still got 401 error. Script only works if you enter the token manually or with this v5.2.3 patch:

--- a/deleteDiscordMessages.user.js
+++ b/deleteDiscordMessages.user.js
@@ -1172,15 +1172,8 @@ body.undiscord-pick-message.after [id^="message-content-"]:hover::after {
        window.messagePicker = messagePicker;

        function getToken() {
-         window.dispatchEvent(new Event('beforeunload'));
-         const LS = document.body.appendChild(document.createElement('iframe')).contentWindow.localStorage;
-         try {
-           return JSON.parse(LS.token);
-         } catch {
-           log.info('Could not automatically detect Authorization Token in local storage!');
-           log.info('Attempting to grab token using webpack');
-           return (window.webpackChunkdiscord_app.push([[''], {}, e => { window.m = []; for (let c in e.c) window.m.push(e.c[c]); }]), window.m).find(m => m?.exports?.default?.getToken !== void 0).exports.default.getToken();
-         }
+         log.info('Attempting to grab token using webpack');
+         return (window.webpackChunkdiscord_app.push([[''], {}, e => { window.m = []; for (let c in e.c) window.m.push(e.c[c]); }]), window.m).find(m => m?.exports?.default?.getToken !== void 0).exports.default.getToken();
        }

        function getAuthorId() {

@gouenji-shuuya
Copy link

gouenji-shuuya commented May 24, 2025

@victornpb You added some labels, can you please tell what's remaining?

I suppose it should be squashed, though since it has been a long time, the squash and merge option can be used, adding @testing765 patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR looks good Looks like it's good for merging (maybe be in the next release) PR needs adjusting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firefox autofills password into authorization token field, resulting in Error 401

7 participants