This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 433
added url parsing to allow query params in urls #434
Open
digitalLumberjack
wants to merge
1
commit into
raspberrypi:master
Choose a base branch
from
digitalLumberjack:433-query-params-in-files-url
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
added url parsing to allow query params in urls #434
digitalLumberjack
wants to merge
1
commit into
raspberrypi:master
from
digitalLumberjack:433-query-params-in-files-url
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The change looks good to me. Has it been tested? |
Just thought about something, should we also support that for marketing, os_info and partitions files ? |
For now, I tested with a os_v3.json like this one : {
"os_list": [
{
"description": "Recalbox, the open source retro gaming console for rpi1!",
"icon": "https://install.recalbox.com/v1/noobs/recalboxOS.png",
"marketing_info": "https://install.recalbox.com/v1/noobs/marketing.tar",
"nominal_size": 2048,
"os_info": "https://install.recalbox.com/v1/noobs/rpi1/os.json",
"os_name": "recalboxOS-rpi1",
"partition_setup": "https://install.recalbox.com/v1/noobs/partition_setup.sh",
"partitions_info": "https://install.recalbox.com/v1/noobs/partitions.json",
"release_date": "2016-11-26",
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093",
"supported_models": [
"Pi Model",
"Pi Compute Module",
"Pi Zero"
],
"tarballs": [
"https://install.recalbox.com/v1/noobs/rpi1/boot.tar.xz?source=noobs",
"https://install.recalbox.com/v1/noobs/rpi1/root.tar.xz?source=noobs"
]
}
]
} |
It would make sense to be consistent, but I don't have any strong feelings one way or another. |
maxnet
reviewed
Aug 21, 2017
if (isURL(tarball)) | ||
QString tarballPath = QString(tarball); | ||
if (isURL(tarball)){ | ||
tarballPath = QUrl::fromUserInput(tarball).toString(QUrl::RemoveQuery); | ||
cmd += "wget --no-verbose --tries=inf -O- "+tarball+" | "; |
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.
Might need to escape shell arguments if you are going to allow query parameters.
While ? does not have special meaning to shell, other characters that may appear such as & do.
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.
Good point!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #434
Url is now parsed and query params are removed when checking for file extension.
The remaining issue is if someone would use query params to specify the file like
htttps://mysditribution.com/download?file=root.tar.xz
What do you think ?