Merge pull request #1429 from maticnetwork/master

Backport master to develop
This commit is contained in:
Jerry 2025-01-30 11:35:02 -08:00 committed by GitHub
commit 962923b816
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -204,6 +204,9 @@ func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error) {
if x == nil { if x == nil {
return nil, errInvalidPubkey return nil, errInvalidPubkey
} }
if !S256().IsOnCurve(x, y) {
return nil, errInvalidPubkey
}
return &ecdsa.PublicKey{Curve: S256(), X: x, Y: y}, nil return &ecdsa.PublicKey{Curve: S256(), X: x, Y: y}, nil
} }

View file

@ -23,7 +23,7 @@ import (
const ( const (
VersionMajor = 1 // Major version component of the current release VersionMajor = 1 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release VersionMinor = 5 // Minor version component of the current release
VersionPatch = 4 // Patch version component of the current release VersionPatch = 5 // Patch version component of the current release
VersionMeta = "" // Version metadata to append to the version string VersionMeta = "" // Version metadata to append to the version string
) )