Libgourou

Libgourou Commit Details

Date:2023-01-05 21:26:05 (8 months 17 days ago)
Author:Grégory Soutadé
Branch:master
Commit:34216d1b6e38a2119891a446cd08889380bd8a59
Parents: ffd2004cbb42f9e0cf244071ce9731ef2fe48a9f
Message:Check for target user before trying to decrypt a file

Changes:
Msrc/libgourou.cpp (1 diff)

File differences

src/libgourou.cpp
10351035
10361036
10371037
1038
1039
1040
1041
1042
10431038
10441039
1040
1041
1042
1043
1044
10451045
10461046
10471047
std::string user = extractTextElem(rightsDoc, "/adept:rights/licenseToken/user");
if (this->user->getUUID() != user)
{
EXCEPTION(DRM_INVALID_USER, "This book has been downloaded for another user (" << user << ")");
}
if (!encryptionKey)
{
if (this->user->getUUID() != user)
{
EXCEPTION(DRM_INVALID_USER, "This book has been downloaded for another user (" << user << ")");
}
std::string encryptedKey = extractTextElem(rightsDoc, "/adept:rights/licenseToken/encryptedKey");
std::string keyType = extractTextAttribute(rightsDoc, "/adept:rights/licenseToken/encryptedKey", "keyType", false);

Archive Download the corresponding diff file