Skip to content

[ENG-10340] Check for flag#11792

Open
bodintsov wants to merge 3 commits into
CenterForOpenScience:feature/pbs-26-13from
bodintsov:fix/use-account-get-disabled
Open

[ENG-10340] Check for flag#11792
bodintsov wants to merge 3 commits into
CenterForOpenScience:feature/pbs-26-13from
bodintsov:fix/use-account-get-disabled

Conversation

@bodintsov

Copy link
Copy Markdown
Contributor

Ticket

https://openscience.atlassian.net/browse/ENG-10340

Purpose

Fix the user's account getting disabled

Changes

Added a check for the frag in the method

Side Effects

TBD

QE Notes

TBD

CE Notes

TBD

Documentation

TBD

@bodintsov bodintsov force-pushed the fix/use-account-get-disabled branch from 341cbde to 26e58cf Compare July 1, 2026 11:46
@bodintsov bodintsov force-pushed the fix/use-account-get-disabled branch from 26e58cf to 4c6cf27 Compare July 1, 2026 14:13
Comment thread osf/models/validators.py
return False

text = name_content.lower()
if any(suffix in text for suffix in ['m.sc.', 'msc.', 'phd.', 'ph.d.', 'msc.pt', 'pt.', 'prof.', 'dr.', 'md.', 'jd.', 'esq.']):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is far too specific and only handles the cases we know of, not the potential future cases. I think we need to adjust the DOMAIN_REGEX to be better (it should grab complete URLs), and also maybe if the domain regex finds something, pass the suspected domain through urllib.parse.urlsplit to see if it has a scheme and a netloc. If it doesn't have both of those, we could probably return false, since it won't link in an email to a location.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants