From da1316a85c79410d0c5da50962fde551a5cf77f3 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:29:32 -0700 Subject: [PATCH] Added Serialization Values Issue gh-16276 --- ...etailsManager$PasswordModifyRequest.serialized | Bin 0 -> 151 bytes ...kenIntrospector$ArrayListFromString.serialized | 0 ...kenIntrospector$ArrayListFromString.serialized | 0 .../ldap/userdetails/LdapUserDetailsManager.java | 4 ++++ .../SpringOpaqueTokenIntrospector.java | 4 ++++ .../SpringReactiveOpaqueTokenIntrospector.java | 4 ++++ 6 files changed, 12 insertions(+) create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.ldap.userdetails.LdapUserDetailsManager$PasswordModifyRequest.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringOpaqueTokenIntrospector$ArrayListFromString.serialized create mode 100644 config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringReactiveOpaqueTokenIntrospector$ArrayListFromString.serialized diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.ldap.userdetails.LdapUserDetailsManager$PasswordModifyRequest.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.ldap.userdetails.LdapUserDetailsManager$PasswordModifyRequest.serialized new file mode 100644 index 0000000000000000000000000000000000000000..39ce303aa06d23efb9eea4ca96635bbd11cba5cf GIT binary patch literal 151 zcmXBLF$%&k6oBC<^au`4F3#xzoD|0vMG?g9(Y%Ie+r;-?DmjW5aPm-Iz&jXl{C@b~ zUsW)vizll&kQ;1E(Bs3?O*1x;oFv^D2s$#7K>^pXu5vhKZ~v}g0E@KT19Lu2?Tu^G s0q+r6n)By5pYdy|CY35i=pu?*R96_GbiUjq!8H-2U6c^zD1^|jem-tF0ssI2 literal 0 HcmV?d00001 diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringOpaqueTokenIntrospector$ArrayListFromString.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringOpaqueTokenIntrospector$ArrayListFromString.serialized new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringReactiveOpaqueTokenIntrospector$ArrayListFromString.serialized b/config/src/test/resources/serialized/6.4.x/org.springframework.security.oauth2.server.resource.introspection.SpringReactiveOpaqueTokenIntrospector$ArrayListFromString.serialized new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java index 43f136403a7..53d46980aca 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java @@ -18,6 +18,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.Serial; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; @@ -491,6 +492,9 @@ private void changePasswordUsingExtensionOperation(LdapName userDn, String oldPa */ private static class PasswordModifyRequest implements ExtendedRequest { + @Serial + private static final long serialVersionUID = 3154223576081503237L; + private static final byte SEQUENCE_TYPE = 48; private static final String PASSWORD_MODIFY_OID = "1.3.6.1.4.1.4203.1.11.1"; diff --git a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringOpaqueTokenIntrospector.java b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringOpaqueTokenIntrospector.java index 18723e6743f..4674ab78868 100644 --- a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringOpaqueTokenIntrospector.java +++ b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringOpaqueTokenIntrospector.java @@ -16,6 +16,7 @@ package org.springframework.security.oauth2.server.resource.introspection; +import java.io.Serial; import java.net.URI; import java.time.Instant; import java.util.ArrayList; @@ -271,6 +272,9 @@ private Collection authorities(List scopes) { // gh-7563 private static final class ArrayListFromString extends ArrayList { + @Serial + private static final long serialVersionUID = -1804103555781637109L; + ArrayListFromString(String... elements) { super(Arrays.asList(elements)); } diff --git a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringReactiveOpaqueTokenIntrospector.java b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringReactiveOpaqueTokenIntrospector.java index ae342cb169b..7c6bf8ecb05 100644 --- a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringReactiveOpaqueTokenIntrospector.java +++ b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/introspection/SpringReactiveOpaqueTokenIntrospector.java @@ -16,6 +16,7 @@ package org.springframework.security.oauth2.server.resource.introspection; +import java.io.Serial; import java.net.URI; import java.time.Instant; import java.util.ArrayList; @@ -225,6 +226,9 @@ private Collection authorities(List scopes) { // gh-7563 private static final class ArrayListFromString extends ArrayList { + @Serial + private static final long serialVersionUID = 9182779930765511117L; + ArrayListFromString(String... elements) { super(Arrays.asList(elements)); }