crypt: handle length format violation for length=40

This commit is contained in:
Denys Smirnov 2018-10-08 18:35:33 +03:00
parent 84284c88ec
commit 5d09fa8cde

View File

@ -34,7 +34,7 @@ func newFilterV2(d FilterDict) (Filter, error) {
// Standard security handler expresses the length in multiples of 8 (16 means 128)
// We only deal with standard so far. (Public key not supported yet).
if d.Length < 5 || d.Length > 16 {
if d.Length == 64 || d.Length == 128 {
if d.Length == 40 || d.Length == 64 || d.Length == 128 {
common.Log.Debug("STANDARD VIOLATION: Crypt Length appears to be in bits rather than bytes - assuming bits (%d)", d.Length)
d.Length /= 8
} else {