Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-azure-storage-file-share for 
openSUSE:Factory checked in at 2026-11-02 16:40:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-storage-file-share (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-storage-file-share.new.1255 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-storage-file-share"

Mon Nov  2 16:40:25 2026 rev:38 rq:1394447 version:12.27.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-azure-storage-file-share/python-azure-storage-file-share.changes
  2026-10-01 16:49:48.235974704 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-azure-storage-file-share.new.1255/python-azure-storage-file-share.changes
        2026-11-02 16:41:18.922617410 +0100
@@ -1,0 +2,8 @@
+Mon Nov  2 09:14:20 UTC 2026 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 12.27.1
+  + For detailed information about changes see the
+    CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure_storage_file_share-12.27.0.tar.gz

New:
----
  azure_storage_file_share-12.27.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-azure-storage-file-share.spec ++++++
--- /var/tmp/diff_new_pack.aq0Nra/_old  2026-11-02 16:41:19.695649798 +0100
+++ /var/tmp/diff_new_pack.aq0Nra/_new  2026-11-02 16:41:19.696649840 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-azure-storage-file-share
-Version:        12.27.0
+Version:        12.27.1
 Release:        0
 Summary:        Azure Storage File Share client library for Python
 License:        MIT

++++++ azure_storage_file_share-12.27.0.tar.gz -> 
azure_storage_file_share-12.27.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure_storage_file_share-12.27.0/CHANGELOG.md 
new/azure_storage_file_share-12.27.1/CHANGELOG.md
--- old/azure_storage_file_share-12.27.0/CHANGELOG.md   2026-09-30 
20:46:34.000000000 +0200
+++ new/azure_storage_file_share-12.27.1/CHANGELOG.md   2026-10-29 
21:11:09.217893400 +0100
@@ -1,5 +1,11 @@
 # Release History
 
+## 12.27.1 (2026-10-20)
+
+### Bugs Fixed
+- Fixed UTC conversion of timezone-aware datetimes in `generate_account_sas`, 
`generate_share_sas`, `generate_file_sas`, and 
`ShareServiceClient.get_user_delegation_key` (sync and async). Datetimes 
without timezone information continue to be treated as UTC.
+- Fixed an issue where certain headers were not being properly redacted when 
DEBUG logging was enabled.
+
 ## 12.27.0 (2026-09-30)
 
 This version and all future versions will require Python 3.10+. Python 3.9 is 
no longer supported.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure_storage_file_share-12.27.0/PKG-INFO 
new/azure_storage_file_share-12.27.1/PKG-INFO
--- old/azure_storage_file_share-12.27.0/PKG-INFO       2026-09-30 
21:12:34.012617600 +0200
+++ new/azure_storage_file_share-12.27.1/PKG-INFO       2026-10-29 
21:35:57.996963000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: azure-storage-file-share
-Version: 12.27.0
+Version: 12.27.1
 Summary: Microsoft Corporation Azure Storage File Share Client Library for 
Python
 Author-email: Microsoft Corporation <[email protected]>
 License-Expression: MIT
@@ -423,6 +423,12 @@
 
 # Release History
 
+## 12.27.1 (2026-10-20)
+
+### Bugs Fixed
+- Fixed UTC conversion of timezone-aware datetimes in `generate_account_sas`, 
`generate_share_sas`, `generate_file_sas`, and 
`ShareServiceClient.get_user_delegation_key` (sync and async). Datetimes 
without timezone information continue to be treated as UTC.
+- Fixed an issue where certain headers were not being properly redacted when 
DEBUG logging was enabled.
+
 ## 12.27.0 (2026-09-30)
 
 This version and all future versions will require Python 3.10+. Python 3.9 is 
no longer supported.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_shared/parser.py 
new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_shared/parser.py
--- 
old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_shared/parser.py  
    2026-09-30 20:46:34.000000000 +0200
+++ 
new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_shared/parser.py  
    2026-10-29 21:11:09.224893300 +0100
@@ -4,8 +4,8 @@
 # license information.
 # --------------------------------------------------------------------------
 
-from datetime import datetime, timezone
-from typing import Optional
+from datetime import date, datetime, timezone
+from typing import Optional, Union
 
 EPOCH_AS_FILETIME = 116444736000000000  # January 1, 1970 as MS filetime
 HUNDREDS_OF_NANOSECONDS = 10000000
@@ -19,7 +19,9 @@
 DEVSTORE_ACCOUNT_KEY = 
"Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
 
 
-def _to_utc_datetime(value: datetime) -> str:
+def _to_utc_datetime(value: Union[date, datetime]) -> str:
+    if isinstance(value, datetime) and value.utcoffset() is not None:
+        value = value.astimezone(timezone.utc)
     return value.strftime("%Y-%m-%dT%H:%M:%SZ")
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_shared/policies.py
 
new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_shared/policies.py
--- 
old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_shared/policies.py
    2026-09-30 20:46:34.000000000 +0200
+++ 
new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_shared/policies.py
    2026-10-29 21:11:09.224893300 +0100
@@ -16,7 +16,9 @@
     parse_qsl,
     urlencode,
     urlparse,
+    urlsplit,
     urlunparse,
+    urlunsplit,
 )
 from wsgiref.handlers import format_date_time
 
@@ -61,6 +63,38 @@
 SM_HEADER = "x-ms-structured-body"
 SM_HEADER_V1_CRC64 = "XSM/1.0; properties=crc64"
 SM_LENGTH_HEADER = "x-ms-structured-content-length"
+_LOG_REDACTED = "*****"
+_LOG_REDACTED_HEADERS = frozenset(
+    {
+        "authorization",
+        "x-ms-authorization-auxiliary",
+        "x-ms-copy-source-authorization",
+        "x-ms-encryption-key",
+        "x-ms-source-encryption-key",
+    }
+)
+_LOG_SAS_URL_HEADERS = frozenset(
+    {
+        "x-ms-copy-source",
+        "x-ms-file-rename-source",
+        "x-ms-rename-source",
+    }
+)
+
+
+def _remove_sas_from_url(value: str) -> str:
+    scheme, netloc, path, query, fragment = urlsplit(value)
+    pairs = parse_qsl(query, keep_blank_values=True)
+    query = urlencode([(k, _LOG_REDACTED if k.lower() == "sig" else v) for k, 
v in pairs])
+    return urlunsplit((scheme, netloc, path, query, fragment))
+
+
+def _redact_header_for_log(name: str, value: Any) -> Any:
+    if name.lower() in _LOG_REDACTED_HEADERS:
+        return _LOG_REDACTED
+    if name.lower() in _LOG_SAS_URL_HEADERS or "sig=" in str(value).lower():
+        return _remove_sas_from_url(str(value))
+    return value
 
 
 def encode_base64(data: Union[bytes, str]) -> str:
@@ -263,27 +297,7 @@
                 _LOGGER.debug("Request method: %r", http_request.method)
                 _LOGGER.debug("Request headers:")
                 for header, value in http_request.headers.items():
-                    if header.lower() == "authorization":
-                        value = "*****"
-                    elif header.lower() == "x-ms-copy-source" and "sig" in 
value:
-                        # take the url apart and scrub away the signed 
signature
-                        scheme, netloc, path, params, query, fragment = 
urlparse(value)
-                        parsed_qs = dict(parse_qsl(query))
-                        parsed_qs["sig"] = "*****"
-
-                        # the SAS needs to be put back together
-                        value = urlunparse(
-                            (
-                                scheme,
-                                netloc,
-                                path,
-                                params,
-                                urlencode(parsed_qs),
-                                fragment,
-                            )
-                        )
-
-                    _LOGGER.debug("    %r: %r", header, value)
+                    _LOGGER.debug("    %r: %r", header, 
_redact_header_for_log(header, value))
                 _LOGGER.debug("Request body:")
 
                 if logging_body:
@@ -306,7 +320,7 @@
                 _LOGGER.debug("Response status: %r", 
response.http_response.status_code)
                 _LOGGER.debug("Response headers:")
                 for res_header, value in 
response.http_response.headers.items():
-                    _LOGGER.debug("    %r: %r", res_header, value)
+                    _LOGGER.debug("    %r: %r", res_header, 
_redact_header_for_log(res_header, value))
 
                 # We don't want to log binary data if the response is a file.
                 _LOGGER.debug("Response content:")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_version.py 
new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_version.py
--- old/azure_storage_file_share-12.27.0/azure/storage/fileshare/_version.py    
2026-09-30 20:46:34.000000000 +0200
+++ new/azure_storage_file_share-12.27.1/azure/storage/fileshare/_version.py    
2026-10-29 21:11:09.225893500 +0100
@@ -6,4 +6,4 @@
 # Changes may cause incorrect behavior and will be lost if the code is 
regenerated.
 # --------------------------------------------------------------------------
 
-VERSION = "12.27.0"
+VERSION = "12.27.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure_storage_file_share-12.27.0/azure_storage_file_share.egg-info/PKG-INFO 
new/azure_storage_file_share-12.27.1/azure_storage_file_share.egg-info/PKG-INFO
--- 
old/azure_storage_file_share-12.27.0/azure_storage_file_share.egg-info/PKG-INFO 
    2026-09-30 21:12:33.000000000 +0200
+++ 
new/azure_storage_file_share-12.27.1/azure_storage_file_share.egg-info/PKG-INFO 
    2026-10-29 21:35:57.863992700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: azure-storage-file-share
-Version: 12.27.0
+Version: 12.27.1
 Summary: Microsoft Corporation Azure Storage File Share Client Library for 
Python
 Author-email: Microsoft Corporation <[email protected]>
 License-Expression: MIT
@@ -423,6 +423,12 @@
 
 # Release History
 
+## 12.27.1 (2026-10-20)
+
+### Bugs Fixed
+- Fixed UTC conversion of timezone-aware datetimes in `generate_account_sas`, 
`generate_share_sas`, `generate_file_sas`, and 
`ShareServiceClient.get_user_delegation_key` (sync and async). Datetimes 
without timezone information continue to be treated as UTC.
+- Fixed an issue where certain headers were not being properly redacted when 
DEBUG logging was enabled.
+
 ## 12.27.0 (2026-09-30)
 
 This version and all future versions will require Python 3.10+. Python 3.9 is 
no longer supported.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure_storage_file_share-12.27.0/azure_storage_file_share.egg-info/SOURCES.txt
 
new/azure_storage_file_share-12.27.1/azure_storage_file_share.egg-info/SOURCES.txt
--- 
old/azure_storage_file_share-12.27.0/azure_storage_file_share.egg-info/SOURCES.txt
  2026-09-30 21:12:33.000000000 +0200
+++ 
new/azure_storage_file_share-12.27.1/azure_storage_file_share.egg-info/SOURCES.txt
  2026-10-29 21:35:57.887921300 +0100
@@ -125,6 +125,7 @@
 tests/test_helpers_async.py
 tests/test_nfs.py
 tests/test_nfs_async.py
+tests/test_sas.py
 tests/test_share.py
 tests/test_share_async.py
 tests/perfstress_tests/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure_storage_file_share-12.27.0/tests/test_sas.py 
new/azure_storage_file_share-12.27.1/tests/test_sas.py
--- old/azure_storage_file_share-12.27.0/tests/test_sas.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/azure_storage_file_share-12.27.1/tests/test_sas.py      2026-10-29 
21:11:09.232893500 +0100
@@ -0,0 +1,44 @@
+# -------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+# --------------------------------------------------------------------------
+
+from base64 import b64encode
+from datetime import date, datetime, timedelta, timezone
+from urllib.parse import parse_qs
+
+import pytest
+
+from azure.storage.fileshare import generate_file_sas
+
+
[email protected](
+    "expiry, expected",
+    [
+        (datetime(2026, 10, 13, 12, 34, 56), "2026-10-13T12:34:56Z"),
+        (datetime(2026, 10, 13, 12, 34, 56, tzinfo=timezone.utc), 
"2026-10-13T12:34:56Z"),
+        (
+            datetime(2026, 10, 13, 12, 34, 56, 
tzinfo=timezone(timedelta(hours=5, minutes=30))),
+            "2026-10-13T07:04:56Z",
+        ),
+        (
+            datetime(2026, 10, 13, 12, 34, 56, 
tzinfo=timezone(timedelta(hours=-7))),
+            "2026-10-13T19:34:56Z",
+        ),
+        (datetime(2026, 1, 1, 1, tzinfo=timezone(timedelta(hours=2))), 
"2025-12-31T23:00:00Z"),
+        (datetime(2026, 12, 31, 23, tzinfo=timezone(timedelta(hours=-2))), 
"2027-01-01T01:00:00Z"),
+        (datetime(2026, 10, 13, 12, 34, 56, 123456, tzinfo=timezone.utc), 
"2026-10-13T12:34:56Z"),
+        (date(2026, 10, 13), "2026-10-13T00:00:00Z"),
+    ],
+)
+def test_generate_file_sas_expiry(expiry, expected):
+    sas = generate_file_sas(
+        account_name="account",
+        share_name="share",
+        file_path=["directory", "file"],
+        account_key=b64encode(b"fake-account-key").decode("ascii"),
+        permission="r",
+        expiry=expiry,
+    )
+    assert parse_qs(sas)["se"] == [expected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure_storage_file_share-12.27.0/tests/test_share.py 
new/azure_storage_file_share-12.27.1/tests/test_share.py
--- old/azure_storage_file_share-12.27.0/tests/test_share.py    2026-09-30 
20:46:34.000000000 +0200
+++ new/azure_storage_file_share-12.27.1/tests/test_share.py    2026-10-29 
21:11:09.232893500 +0100
@@ -23,6 +23,8 @@
     ResourceExistsError,
     ResourceNotFoundError,
 )
+from azure.core.pipeline import PipelineContext, PipelineRequest
+from azure.core.pipeline.transport import HttpRequest  # pylint: 
disable=non-abstract-transport-import
 from azure.core.pipeline.transport import RequestsTransport  # pylint: 
disable=no-name-in-module
 from azure.storage.fileshare import (
     AccessPolicy,
@@ -41,6 +43,7 @@
     ShareServiceClient,
     StorageErrorCode,
 )
+from azure.storage.fileshare._shared.policies import StorageLoggingPolicy
 
 # 
------------------------------------------------------------------------------
 TEST_SHARE_PREFIX = "share"
@@ -1969,6 +1972,40 @@
         content = file_client.download_file().readall()
         assert content == data
 
+    def _log_request(self, headers):
+        request = HttpRequest("PUT", 
"https://account.file.core.windows.net/c/b";, headers=headers)
+        with LogCaptured(self) as log_captured:
+            
StorageLoggingPolicy(logging_enable=True).on_request(PipelineRequest(request, 
PipelineContext(None)))
+            return log_captured.getvalue()
+
+    def test_secret_headers_are_redacted(self):
+        for header in (
+            "Authorization",
+            "x-ms-encryption-key",
+            "x-ms-source-encryption-key",
+            "x-ms-copy-source-authorization",
+        ):
+            log_as_str = self._log_request({header: "value"})
+            assert header in log_as_str
+            assert "value" not in log_as_str
+
+    def test_source_url_sas_is_scrubbed(self):
+        for header in ("x-ms-copy-source", "x-ms-file-rename-source", 
"x-ms-rename-source"):
+            log_as_str = self._log_request({header: 
"https://src.file.core.windows.net/c/b?sv=2025-01-05&sig=value"})
+            assert "value" not in log_as_str
+            assert "src.file.core.windows.net" in log_as_str
+
+    def test_diagnostic_headers_remain_visible(self):
+        log_as_str = self._log_request(
+            {
+                "x-ms-encryption-key-sha256": "value",
+                "x-ms-encryption-algorithm": "AES256",
+                "x-ms-client-request-id": "req-id-123",
+            }
+        )
+        for value in ("value", "AES256", "req-id-123"):
+            assert log_as_str.count(value) == 1
+
 
 # 
------------------------------------------------------------------------------
 if __name__ == "__main__":

Reply via email to