Fix for issue 573: don't throw with unknown Armor Headers, but just
with invalid ones
This commit is contained in:
parent
dc2d38d355
commit
93d823abb4
|
@ -224,7 +224,7 @@ function splitHeaders(text) {
|
||||||
*/
|
*/
|
||||||
function verifyHeaders(headers) {
|
function verifyHeaders(headers) {
|
||||||
for (var i = 0; i < headers.length; i++) {
|
for (var i = 0; i < headers.length; i++) {
|
||||||
if (!/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(headers[i])) {
|
if (!/^[^: ]+: .+$/.test(headers[i])) {
|
||||||
throw new Error('Improperly formatted armor header: ' + headers[i]);
|
throw new Error('Improperly formatted armor header: ' + headers[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user