Fix Endianness issue during wallet decryption
Needs ReviewPublic

Authored by chriscz on May 26 2020, 12:02 AM.

Details

Reviewers
dfaure
aacid
Summary

Correctly determine endianness on the specific platform using `endian.h' header available at least on GCC. Must be verified for other platforms and compilers.

Test Plan

make install; killall kwalletd5; kwalletd5; kwalletmanager5
Open wallet, enter password. Wallet now accepts my password and I can still see my passwords.

Diff Detail

Repository
R311 KWallet
Lint
Lint Skipped
Unit
Unit Tests Skipped
chriscz created this revision.May 26 2020, 12:02 AM
Restricted Application added a project: Frameworks. ยท View Herald TranscriptMay 26 2020, 12:02 AM
Restricted Application added a subscriber: kde-frameworks-devel. ยท View Herald Transcript
chriscz requested review of this revision.May 26 2020, 12:02 AM

This stack overflow answer has a more exhaustive approach to determining endianness. It may be worth extracting this code into a more appropriate header file though. Also here's the issue on the bugzilla tracker

ngraham added a subscriber: ngraham.

Thanks for the patch! FWIW we have moved patch review to GitLab; consider abandoning this and re-submitting it as a merge request at https://invent.kde.org/frameworks/kwallet/-/merge_requests

Here's some documentation: https://community.kde.org/Infrastructure/GitLab

Hi @ngraham Thanks for letting me know! I've opened the PR over on gitlab: https://invent.kde.org/frameworks/kwallet/-/merge_requests/1. It must be quite a mission getting everyone over to new platforms ๐Ÿ˜“ ๐Ÿ˜„