diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index d93c64a..6040edd 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -123,6 +123,7 @@ namespace QuickMedia { string_split(output, '\n', [&](const char *str, size_t size) { GpgLineType line_type = GpgLineType::UNKNOWN; int column = 0; + bool invalid_signature = false; string_split_view(std::string_view(str, size), ':', [&](const char *str, size_t size) { std::string_view section(str, size); @@ -131,8 +132,11 @@ namespace QuickMedia { line_type = GpgLineType::UID; else if(section == "fpr") line_type = GpgLineType::FPR; + } else if(column == 1) { + if(line_type == GpgLineType::UID) + invalid_signature = (section == "e" || section == "r"); // Expired or revoked } else if(column == 9) { - if(line_type == GpgLineType::UID) { + if(line_type == GpgLineType::UID && !invalid_signature) { // Assumes that each uid is preceeded with fpr const std::string user_email = std::string(gpg_display_name_extract_email(section)); if(!user_email.empty() && users_by_email.find(user_email) != users_by_email.end()) { |