-
Notifications
You must be signed in to change notification settings - Fork 11
Clarify cps/constants.py and scripts/lb-wrapper [& refine URL validation, to accept http:// legacy URLs w/o SSL/TLS] #44
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
@deldesir these 2 URL validation sections look stale[*], can you confirm/suggest alongside f50f102 ? [*] Their explanatory comments need help too (: calibre-web/cps/static/js/main.js Lines 182 to 188 in 6ed862a
calibre-web/cps/static/js/main.js Lines 275 to 281 in 6ed862a
|
I remember with a previous version of xklb, the script failed due to the missing protocol. I have yet to test with latest version. |
FWIW this PR narrows it from 3 different places, to just 2 (possibly that's good enough for now?) Finally, this PR was tested successfully on a very recent Ubuntu 24.04 pre-release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Subject line changed, to clarify that this PR fixes support for legacy (e.g. bookmarked) URLs that begin with http:// (i.e. without SSL / TLS). |
CLARIF: Yes it could be argued that we really should also tolerate URLs that begin with uppercase letters in the protocol...
(But the above corner cases are extremely rare, and we have Far Bigger Fish to fry!) |
@deldesir: ok to tighten up a bit for readability?
Can you remind if/why
if [[ ! ${URL} =~ ^http[s]?:// ]]
is truly necessary in lb-wrapper? (Do xklb and/or yt-dlp fail if $URL doesn't begin with "http://" or "https://" ?)Building on: