Uh oh!
There was an error while loading. Please reload this page.
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 |
jku
commented
Dec 2, 2021
alternatively could sanitize the delegated rolename when writing the file like client does ( |
sechkova
commented
Dec 2, 2021
Well it just happened that I did the same thing yesterday: dc908ee |
sechkova
commented
Dec 2, 2021
Bad timing on both sides 🤷 Can you have a look at my commit before dropping yours? Maybe I've missed something. |
MVrachev
commented
Dec 2, 2021
I just had a look and yours seems to cover what I did here, so don't worry. |
MVrachev
commented
Dec 2, 2021
I updated the code by using what @jku suggested. |
There was a problem hiding this comment.
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 <mvrachev@vmware.com>
MVrachev
commented
Dec 13, 2021
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_simulatorleads to anerror:
PermissionError: [Errno 13] Permission denied: '/.json'Please verify and check that the pull request fulfills the following
requirements: