Allow additional unexpected packets in the grammar checker

To make the grammar checker less of a breaking change in v6.
This should be reverted in v7.
This commit is contained in:
Daniel Huigens 2025-05-26 15:23:51 +02:00
parent d94d9d462a
commit b03eae5eca
No known key found for this signature in database
GPG Key ID: CB064A128FA90686
2 changed files with 0 additions and 3 deletions

View File

@ -228,7 +228,6 @@ export default {
* Parsing of packets is normally restricted to a predefined set of packets. For example a Sym. Encrypted Integrity Protected Data Packet can only
* contain a certain set of packets including LiteralDataPacket. With this setting we can allow additional packets, which is probably not advisable
* as a global config setting, but can be used for specific function calls (e.g. decrypt method of Message).
* NB: `config.enforceGrammar` may need to be disabled as well.
* @memberof module:config
* @property {Array} additionalAllowedPackets Allow additional packets on parsing. Defined as array of packet classes, e.g. [PublicKeyPacket]
*/

View File

@ -58,8 +58,6 @@ export class MessageGrammarValidator {
throw new GrammarError('Non-encrypted data packet following ESK packet');
}
this.sawDataPacket = true;
} else {
throw new GrammarError(`Unexpected packet: ${packet}`);
}
}