fix(core): check for correct padding
This commit is contained in:
parent
9928a9156a
commit
0a45f5e71a
1 changed files with 11 additions and 0 deletions
|
@ -187,6 +187,17 @@ export class MtprotoSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
const content = innerReader.object()
|
const content = innerReader.object()
|
||||||
|
|
||||||
|
const paddingSize = innerData.length - innerReader.pos
|
||||||
|
|
||||||
|
if (paddingSize < 12 || paddingSize > 1024) {
|
||||||
|
debug(
|
||||||
|
'warn: ignoring message with invalid padding size: %d',
|
||||||
|
paddingSize
|
||||||
|
)
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
messageId,
|
messageId,
|
||||||
seqNo,
|
seqNo,
|
||||||
|
|
Loading…
Reference in a new issue