Backport JAVASERVERFACES-4137 to our Mojarra 2.1.28 fork for EAP 6.4.x.
The commit that needs to be backported is: https://github.com/javaserverfaces/mojarra/commit/26b8c15dcab647fe8d2026453f80d060d2ebe46c
Here's a description of this issue, as requested by Ilia: ByteArrayGuard's usage of Mac instances is not thread-safe which can randomly result in "ERROR: MAC did not verify!" messages being output. JAVASERVERFACES-4137 fixes this problem by moving Mac instantiation and initialization to the encrypt/decrypt methods in ByteArrayGuard and enabling ViewState data encryption by default.
Commit successfully backported. No regressions found. Verified with EAP 6.4.10.CP.CR2
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.