Skip to content

Autofill fix #631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Autofill fix #631

wants to merge 4 commits into from

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

kazuki-tetsuya added a commit to kazuki-tetsuya/Undiscord that referenced this pull request Nov 15, 2024
- Resolved ESLint issues and addressed invalid header warnings (victornpb#663).
- Implemented autofill for thread channel IDs and restricted message deletion to the corresponding thread (victornpb#610).
- Clarified that omitting a time will disable the date filter functionality (victornpb#643).
- Added a filter to exclude messages containing files or attachments (victornpb#642).
- Fixed various autofill issues (victornpb#631).
- Stopped execution when there are remaining messages (victornpb#619).
- Addressed API errors related to the Wipe Archive Feature (50024 - 50021) (victornpb#603).
- Implemented a workaround for slow search index refreshing (victornpb#584).
@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