Skip to content

fix(wecom): accept urlsafe unpadded inbound aeskey#11899

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/wecom-urlsafe-aeskey-11890
Open

fix(wecom): accept urlsafe unpadded inbound aeskey#11899
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/wecom-urlsafe-aeskey-11890

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • normalize WeCom inbound aeskey values before decrypting downloaded attachments
  • accept urlsafe base64 and restore missing padding before decoding
  • add regression coverage for unpadded urlsafe keys and cached inbound media decryption

Fixes #11890

Testing

  • python3 -m pytest -o addopts='' tests/gateway/test_wecom.py -k 'decrypt_file_bytes_accepts_unpadded_urlsafe_aes_key or cache_media_decrypts_url_payload_before_writing or decrypt_file_bytes_round_trip'
  • python3 -m pytest -o addopts='' tests/gateway/test_wecom.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/wecom WeCom / WeChat Work adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WeCom inbound file decryption fails for urlsafe unpadded aeskey values

2 participants