Skip to content
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

[Build] Add a space character to seperate the url and hash value #14146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xumia
Copy link
Collaborator

@xumia xumia commented Mar 8, 2023

Why I did it

[Build] Add a space character to seperate the url and hash value for Azure Storage SAS Key
If it contains high privilege info, it will be skipped.

How I did it

It only has impact on url packages, does not have impact on the other packages, such as git, deb.
If the url is azure blob storage and contains SAS key, check the privilege and the format.
For checking the privilege part, it makes sure it only contains read or list permission only, if other permissions, skip the url.
For the SAS format, if the SAS ends with '&sp=r' or '&sp=rl', then additional space character will be added in the end of the url, when using the url, the additional character will be removed.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@xumia xumia requested review from qiluo-msft and lguohan as code owners March 8, 2023 00:19
@xumia xumia added the Build label Mar 8, 2023
@xumia xumia force-pushed the fix-seperator branch 7 times, most recently from 32c032a to 45b674b Compare March 11, 2023 00:29
if '.blob.core.' in package and sp:
if len(sp) > 1:
continue
elif len(sp) == 1 and sp[0] != 'r' and sp[0] != 'rl':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just change from '==' to ' =='?
The logic to validate privilege maybe change in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants