Skip to content

Use new verification code format #6077

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

Merged
merged 4 commits into from
Apr 13, 2025

Conversation

flleeppyy
Copy link
Member

@flleeppyy flleeppyy commented Mar 27, 2025

About The Pull Request

Changes the way verification codes are generated for discord linking. Also removes timeboundness, not needed, and makes things more complicated.

Why It's Good For The Game

Preparation for #5679

Changelog

🆑
fix: change discord verification code format
/:cl:

@@ -156,7 +156,7 @@ SUBSYSTEM_DEF(discord)
// While there's a collision in the token, generate a new one (should rarely happen)
while(not_unique)
//Column is varchar 100, so we trim just in case someone does us the dirty later
one_time_token = trim("[pick(common_words)]-[pick(common_words)]-[pick(common_words)]-[pick(common_words)]-[pick(common_words)]-[pick(common_words)]", 100)
one_time_token = trim(uppertext("PLX-VERIFY-[trim(ckey_for, 5)]-[random_string(16, GLOB.hex_characters)]"), 100)
Copy link
Collaborator

@LikeLakers2 LikeLakers2 Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest against this format, as it makes retyping the token into discord much more tedious for no benefit at all.

I'm aware that the intention is for them to select the code, copy, then paste - however, not everyone will think to do that, or even know that you can. That's why the original uses common words - because it's much easier to remember six common words than to repeatedly tab back and forth for a randomly-generated 33-character string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, then I can restructure the window that shows you your code. Hell I'll make it a TGUI window, and make a copy to clipboard command. I really just don't want the possibility of some code being really sexual or gross

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean... if the concern is it sounding sexual or gross, then maybe just remove words from the common words list?

Although frankly I don't see why you would need to - because anyone whose mind is sufficiently in the gutter is going to see a LOT of stuff as sexual.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common words list is used in a lot of places, and i dont think people want me touching it.
regardless, I'm going to keep it like this and pretty it up so people can copy it to clipboard.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guh sorry i need to stop being so pushbacky. would you think refactoring to a tgui window and adding a copy to clipboard functionality would work?

Copy link
Collaborator

@LikeLakers2 LikeLakers2 Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would work.

That said, I really think the best option would be to just use 5 or 6 random common words, because I don't see sexual content coming up that often. If sexual content is still a concern though, perhaps we could change to use EFF's Diceware Word List (though this would require reformatting their provided TXT, which I'd be willing to do if you want me to): https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases

Aside, here's a relevant XKCD: https://xkcd.com/936/

@Absolucy Absolucy merged commit ff30317 into Monkestation:master Apr 13, 2025
27 checks passed
github-actions bot added a commit that referenced this pull request Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Improvement exactly what it says on the tin RED LABEL shut up stalebot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants