Skip to content

Commit

Permalink
[Storage] Fix issues (#18811)
Browse files Browse the repository at this point in the history
* fix

* fix jwt
  • Loading branch information
Juliehzl authored Jul 13, 2021
1 parent c633152 commit dd328f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1760,9 +1760,12 @@ def validate_fs_directory_download_source_url(cmd, namespace):
if namespace.source_path:
file_client = client.get_file_client(file_path=namespace.source_path)
url = file_client.url
namespace.source = _add_sas_for_url(cmd, url=url, account_name=namespace.account_name,
account_key=namespace.account_key, sas_token=namespace.sas_token,
service='blob', resource_types='co', permissions='rl')
if _is_valid_uri(url):
namespace.source = url
else:
namespace.source = _add_sas_for_url(cmd, url=url, account_name=namespace.account_name,
account_key=namespace.account_key, sas_token=namespace.sas_token,
service='blob', resource_types='co', permissions='rl')
del namespace.source_fs
del namespace.source_path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _unserialize_non_msi_token_payload(token_info):
import jwt # pylint: disable=import-error

parsed_authority = urlparse(token_info['_authority'])
decode = jwt.decode(token_info['accessToken'], verify=False, algorithms=['RS256'])
decode = jwt.decode(token_info['accessToken'], algorithms=['RS256'], options={"verify_signature": False})
return {
'access_token': token_info['accessToken'],
'refresh_token': token_info['refreshToken'],
Expand Down

0 comments on commit dd328f0

Please sign in to comment.