-
Notifications
You must be signed in to change notification settings - Fork 275
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
Sanitize repo simulator role names when writing #1702
Conversation
Pull Request Test Coverage Report for Build 1527420364Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
alternatively could sanitize the delegated rolename when writing the file like client does ( |
Well it just happened that I did the same thing yesterday: dc908ee |
Bad timing on both sides 🤷 Can you have a look at my commit before dropping yours? Maybe I've missed something. |
I just had a look and yours seems to cover what I did here, so don't worry. |
I updated the code by using what @jku suggested. |
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.
This commit does not do what the message says.
- It url encodes role names that do not need sanitizing (but does not url encode the delegated role names that could need it)
- Then it skips dumping metadata for roles that actually would need sanitizing if they were used as filenames?
Sanitize the delegated rolenames in the repo simulator when dumping in a directory the same way the ngclient does. That's necessary because when testing fishy role names leads to an error: "PermissionError: [Errno 13] Permission denied: '/.json'" Signed-off-by: Martin Vrachev <[email protected]>
I changed the code to dump the delegated roles and removed the code where I skipped dumping. |
Description of the changes being introduced by the pull request:
Sanitize the role names in the repo simulator when dumping in a
directory the same way the ngclient does.
That's necessary because when testing fishy role names from
test_updater_with_simulator
leads to anerror:
PermissionError: [Errno 13] Permission denied: '/.json'
Please verify and check that the pull request fulfills the following
requirements: