The GitHub Actions job "Nightly Multi JVM Tests" on pekko.git/main has 
succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
f70bfb668c1bd48228edb6785c2445007bb9dea2 / PJ Fanning 
<[email protected]>
fix: make serializer id 0 reject non-empty bytes and manifests (#3751)

* fix: make NullSerializer reject non-empty input

Motivation:
Since #3495, Serialization.deserialize(bytes, 0, manifest) with a
non-empty manifest returns Success(null), whatever the bytes contain.
Id 0 is a common default for a missing int value, so a corrupt stored
record can load as a null payload instead of failing.

Modification:
NullSerializer.fromBinary throws NotSerializableException for non-empty
input. toBinary only ever produces an empty array, so such input cannot
have come from this serializer. Document the behaviour of serializer
id 0.

Result:
Deserializing non-empty bytes with serializer id 0 fails, with an empty
or non-empty manifest. Empty bytes still deserialize to null, and #3495
stays in place with no class loading added.

Tests:
- sbt "actor-tests/testOnly org.apache.pekko.serialization.*": 171 passed
  (the new rejection test failed before the fix)
- sbt "remote/testOnly ...PekkoProtocolSpec 
...ActorSelectionQueueDistributionSpec":
  25 passed
- sbt actor/mimaReportBinaryIssues: no issues
- docs/paradox: not run locally, left to CI

References:
Fixes #3749

* fix: reject a non-empty manifest for serializer id 0

Motivation:
Since #3495, Serialization.deserialize(empty, 0, "not-a-class") returns
Success(null). 2.0.0-M4 failed with NotSerializableException. A real
serialized null always has an empty manifest, so this input cannot have
come from a conforming sender.

Modification:
Serialization.deserializeByteArray throws NotSerializableException for
NullSerializer with a non-empty manifest. The check only tests whether
the manifest is empty, so #3495 stays in place and nothing is loaded.

Result:
An unresolvable manifest with serializer id 0 fails as it did in
2.0.0-M4. A loadable manifest also fails, where 2.0.0-M4 returned
Success(null), because matching that would need the class lookup that
#3495 removed.

Tests:
- sbt "actor-tests/testOnly org.apache.pekko.serialization.*": 172 passed
  (the new test failed before the fix)
- sbt actor/mimaReportBinaryIssues: no issues
- docs/paradox: not run locally, left to CI

References:
Fixes #3752

Report URL: https://github.com/apache/pekko/actions/runs/42328349483

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to