aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-07-04 13:46:45 +0000
committerMaximilian Krambach <[email protected]>2018-07-04 13:46:45 +0000
commit10f2106404f01e7bb369fc66a597875fb455cd27 (patch)
treec4d84cbac661004ca72613ebd4b5cfaf3825de4e /lang/js
parentjs: Add jsdoc, update webpack-cli dependency (diff)
downloadgpgme-10f2106404f01e7bb369fc66a597875fb455cd27.tar.gz
gpgme-10f2106404f01e7bb369fc66a597875fb455cd27.zip
js: properly reject pgp message without signature
-- * A verify at gpgme-json does not fail if there is a valid pgp message that does not include a signature. Instead, the answer will be devoid of signatures. In javascript, the SIG_NO_SIG error should be reported here, but wasn't.
Diffstat (limited to 'lang/js')
-rw-r--r--lang/js/src/gpgmejs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/js/src/gpgmejs.js b/lang/js/src/gpgmejs.js
index c2a6b8b6..f49361dc 100644
--- a/lang/js/src/gpgmejs.js
+++ b/lang/js/src/gpgmejs.js
@@ -254,7 +254,7 @@ export class GpgME {
}
return new Promise(function(resolve, reject){
msg.post().then(function (message){
- if (!message.info.signatures){
+ if (!message.info || !message.info.signatures){
reject(gpgme_error('SIG_NO_SIGS'));
} else {
let _result = collectSignatures(message.info.signatures);