-
Notifications
You must be signed in to change notification settings - Fork 100
fix(CivitAI): correct parse URL with query params #323
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
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 50.87% 51.12% +0.25%
==========================================
Files 32 32
Lines 3444 3468 +24
==========================================
+ Hits 1752 1773 +21
- Misses 1692 1695 +3
🚀 New features to boost your workflow:
|
9b6e997 to
2d69000
Compare
|
@bigcat88 Hey man. I stumbled on this somehow. Anyway, the reason why it "worked" before my refactor is that the code was 100% BROKEN before my refactor and ALWAYS set the CivitAI API token headers even for non-CivitAI websites. I fixed that and made it only set the token for CivitAI... but of course I didn't rewrite the code that detects if a URL is a CivitAI URL. I think I cleaned it up a bit, but I didn't fundamentally change the URL detection. Saw that you rewrote the URL detector now to detect all URL types with robust methods. Great work! :) |
We could have avoided this situation only if we had tests for that URLs at the time. No complaints about you; your PR did everything correctly and is very important from a security POV. |
|
Yeah. :) Thank you so much for this project. Comfy-CLI is an amazingly useful project, and I appreciate your great work and quality mind. It was fun to collaborate with you and addressing your feedback on the previous PR. It became better when we settled on using custom environment names and I am glad you caught that design mistake, since it could have become a mess with time if we didn't standardize the envs. 👍 😸 I appreciate everything you do. 🙏 |
Resolves #322
Completely rewrote the
check_civitai_urlimplementation to useurlparseandparse_qsfunctions instead of usual string functions to parse URLs.Additionally expanded tests to cover the new valid URL cases.