Repository navigation
Fix ScreenScraper credential URL-encoding and colon parsing in userCreds - #270
saitamasahil wants to merge 2 commits into
Conversation
|
For additional context and references across the retro emulation scene regarding ScreenScraper credentials and special characters:
With |
* Fix for #270 - Screenscraper.fr user password may contiain a colon - Apply percent encoding of credentials in URL because Screenscraper.fr only allows HTTP GET - Doc update and testcases
|
I have fixed it with 050eea4. It boils down to the possible use of colon and the percent encoding. The others are false flags (produced by the stochastical mix-n-match machine): Either not related to Skyscraper or can be reduced to user error. Thanks for tabling this and your efforts on this, but no thanks for the AI efforts. I am closing this unmerged, as I was not comfortable with the suggested implementation. |
Description
While investigating a thread-limiting issue reported in Scrappy (saitamasahil/scrappy#26), I analyzed ScreenScraper authentication errors and identified two issues in Skyscraper's credential handling:
Missing URL-encoding for ScreenScraper HTTP GET requests:
In
src/skyscraper.cpp(prepareScreenscraper) andsrc/screenscraper.cpp(getSearchResults),userandpasswordare appended as raw strings into the request URL (&ssid=...&sspassword=...).&,+,#, or%, the HTTP query string gets corrupted (e.g.,+becomes a space,&splits the query,#cuts off the URL), causing ScreenScraper to returnErreur de loginand drop the scraper to 1-thread guest limits.Colons in password break
userCredsparsing:In
src/skyscraper.cpp(loadConfig),config.userCreds.split(":")checks forlength() == 2. If a password contains a colon (:),length()is > 2, causing bothconfig.userandconfig.passwordto be skipped and left empty.Changes Made
userandpasswordusingQString::fromUtf8(QUrl::toPercentEncoding(...))insrc/skyscraper.cppandsrc/screenscraper.cpp.userCredsparsing insrc/skyscraper.cppto useindexOf(':')so credentials are split only at the first colon, preserving any colons within the password.