[#2831] - Add optional JEP-290 ObjectInputFilter support to DefaultSerializer, with a conservative resource-limit default on RememberMe deserialization (#2832)

* [#2831] - Add optional JEP-290 ObjectInputFilter support to DefaultSerializer

Add an optional ObjectInputFilter (getObjectInputFilter/setObjectInputFilter,
null by default) to DefaultSerializer, applied in deserialize() when set, and
pre-configure AbstractRememberMeManager's default serializer with a conservative
resource-limit-only filter (maxdepth=30;maxarray=100000;maxrefs=10000;maxbytes=10000000).
Document the one-line class-based allow-list override on getSerializer(). The null
default means no behavior change for existing callers.

* Address review: pull ObjectInputFilter API up into Serializer, @since 3.0.1

Move getObjectInputFilter/setObjectInputFilter onto the Serializer interface
as default methods (getter returns null, setter is a no-op); DefaultSerializer
overrides them. AbstractRememberMeManager now calls
serializer.setObjectInputFilter(...) directly, removing the instanceof check,
the cast, and @SuppressWarnings. The documented override example and the test
drop their casts too. Change all @since 3.1 occurrences to 3.0.1.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Lenny Primak <lenny@flowlogix.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
5 files changed
tree: 61319540bf4277f03eb5968e8eac19880e4745ed
  1. .github/
  2. .mvn/
  3. cache/
  4. config/
  5. core/
  6. crypto/
  7. event/
  8. integration-tests/
  9. lang/
  10. samples/
  11. src/
  12. support/
  13. test-coverage/
  14. tools/
  15. web/
  16. .asf.yaml
  17. .codespellrc
  18. .editorconfig
  19. .gitattributes
  20. .gitignore
  21. .jenkins.groovy
  22. .jenkins_maven_args
  23. .pre-commit-config.yaml
  24. AGENTS.md
  25. CITATION.cff
  26. CONTRIBUTING.md
  27. jitpack.yml
  28. LICENSE
  29. mvnw
  30. mvnw.cmd
  31. NOTICE
  32. pom.xml
  33. README
  34. README.md
  35. RELEASE-NOTES
  36. SECURITY.md
  37. shiro.doap.rdf
README.md

Maven Central Build Status OpenSSF Scorecard Reproducible Builds

Apache Shiro

Apache Shiro is a powerful and easy-to-use Java security framework that performs authentication, authorization, cryptography, and session management. With Shiro’s easy-to-understand API, you can quickly and easily secure any application – from the smallest mobile applications to the largest web and enterprise applications.

Documentation and Examples

https://shiro.apache.org

Tutorials

License

Apache License, Version 2.0