Skip to content
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

TypeID.from_string() validates incorrectly #12

Open
iron3oxide opened this issue May 13, 2024 · 1 comment · Fixed by iron3oxide/typeid-python#1 · May be fixed by #13
Open

TypeID.from_string() validates incorrectly #12

iron3oxide opened this issue May 13, 2024 · 1 comment · Fixed by iron3oxide/typeid-python#1 · May be fixed by #13

Comments

@iron3oxide
Copy link

iron3oxide commented May 13, 2024

I am trying to use TypeIDs as API keys and want to include both the key name and the owner name in the prefix, e.g. keyname_owner_01hxsjs5zqfv39nsdbw9m9qdcp. While it is possible to create this TypeID, trying to parse the resulting key back into a TypeID fails with an InvalidTypeIDStringException. Will submit a PR to fix this shortly.

EDIT: I'm stupid, forgot the quotes. No exploit possible

iron3oxide added a commit to iron3oxide/typeid-python that referenced this issue May 13, 2024
Refactored the logic in `get_prefix_and_suffix` function to improve type
prefix and suffix extraction. Now using `rsplit` method to accurately extract
the prefix and suffix from the input string. 

Closes akhundMurad#12
@iron3oxide iron3oxide linked a pull request May 13, 2024 that will close this issue
@iron3oxide
Copy link
Author

Seems Github misunderstood my comment

@iron3oxide iron3oxide reopened this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant