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

187 safe url string already encoded user pass #196

Conversation

felipeboffnunes
Copy link
Member

@felipeboffnunes felipeboffnunes commented Oct 21, 2022

Fixes #187

using urllib.unquote() on the username and password, before urllib.quote() solves the % issue.
Nevertheless, I am not sure the current behavior displayed for %26 -> & is the desirable one.

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Merging #196 (70f0460) into master (74c9041) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #196   +/-   ##
=======================================
  Coverage   95.96%   95.96%           
=======================================
  Files           6        6           
  Lines         471      471           
  Branches       90       90           
=======================================
  Hits          452      452           
  Misses          9        9           
  Partials       10       10           
Impacted Files Coverage Δ
w3lib/url.py 98.61% <100.00%> (ø)

@wRAR wRAR merged commit 4ba3539 into scrapy:master Oct 26, 2022
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.

safe_url_string URL-encodes already-encoded username and password, breaking idempodency
3 participants