Fix parameter validation and Windows compilation in SaveRingtone security patch - #198
Conversation
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
|
@copilot Can you add tests for this to prove the fix is effective? Also fix the pre-commit issue, perhaps by allowing this particular identifier in |
…ssue Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
Fixed in commit 8a41e90:
|
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
…le creation Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
@copilot Compilation on Windows fails: |
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
... Fixed in commit 083db8d. The issue was that |
|
@copilot The test data seems incomplete: Also, please extend the test to cover all cases the ringtone save is supposed to support. |
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
@copilot There is still and error in the data: Retry the previous task. |
|
@copilot Retry. |
Co-authored-by: nijel <212189+nijel@users.noreply.github.com>
Security fix for unrestricted file permissions (alert #25) had critical bugs: incorrect parameter validation and Windows compilation failures.
Changes
Core Logic Fix
value(ringtone dict) tofile(filename param) inPyObject_AsFileDescriptor()andPyUnicode_Check()Windows Platform Support
Test Coverage
test_save_ringtone_permissionsvalidating owner-only file creation (0o600)Pre-commit
WRONLYconstant name in typos checker💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.