Skip to content

Commit c580069

Browse files
authored
upgrade (#2)
* Update GAE 1.9.63 Fixes: spring-projectsgh-5277 * Update Spring Boot 2.0.1.RELEASE Fixes: spring-projectsgh-5278 # Conflicts: # gradle.properties * Update to nimbus-jose-jwt:5.10 Fixes: spring-projectsgh-5279 * Update to oauth2-oidc-sdk:5.61 Fixes: spring-projectsgh-5280 * Update to javax.servlet-api:4.0.1 Fixes: spring-projectsgh-5281 * Update to aspectj 1.9.1 Fixes: spring-projectsgh-5282 * Update to htmlunit:2.30 Fixes: spring-projectsgh-5283 * Update to mockito-core:2.18.3 Fixes: spring-projectsgh-5284 * Update to selenium 3.11.0 Fixes: spring-projectsgh-5289 * Update to Spring Framework 5.0.6.BUILD-SNAPSHOT Issue: spring-projectsgh-5290 # Conflicts: # gradle/dependency-management.gradle * Add update-dependencies.sh Fixes: spring-projectsgh-5276 * Improve PasswordEncoder deprecated notices Fixes: spring-projectsgh-5296 * NimbusUserInfoResponseClient sets Accept header to JSON Fixes spring-projectsgh-5294 * Add test NimbusUserInfoResponseClient sets Accept header to JSON Issue spring-projectsgh-5294 * Improve ClaimAccessor getClaimAsInstant Fixes spring-projectsgh-5250 * Fix incorrect explanation for customizing query on JdbcDaoImpl
1 parent 4cc5705 commit c580069

File tree

15 files changed

+133
-29
lines changed

15 files changed

+133
-29
lines changed

core/src/main/java/org/springframework/security/core/userdetails/User.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ public static UserBuilder builder() {
326326
* @deprecated Using this method is not considered safe for production, but is
327327
* acceptable for demos and getting started. For production purposes, ensure the
328328
* password is encoded externally. See the method Javadoc for additional details.
329+
* There are no plans to remove this support. It is deprecated to indicate
330+
* that this is considered insecure for production purposes.
329331
*/
330332
@Deprecated
331333
public static UserBuilder withDefaultPasswordEncoder() {

core/src/main/java/org/springframework/security/core/userdetails/jdbc/JdbcDaoImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ protected UserDetails createUserDetails(String username,
302302
* Allows the default query string used to retrieve authorities based on username to
303303
* be overridden, if default table or column names need to be changed. The default
304304
* query is {@link #DEF_AUTHORITIES_BY_USERNAME_QUERY}; when modifying this query,
305-
* ensure that all returned columns are mapped back to the same column names as in the
305+
* ensure that all returned columns are mapped back to the same column positions as in the
306306
* default query.
307307
*
308308
* @param queryString The SQL query string to set
@@ -320,7 +320,7 @@ protected String getAuthoritiesByUsernameQuery() {
320320
* username to be overridden, if default table or column names need to be changed. The
321321
* default query is {@link #DEF_GROUP_AUTHORITIES_BY_USERNAME_QUERY}; when modifying
322322
* this query, ensure that all returned columns are mapped back to the same column
323-
* names as in the default query.
323+
* positions as in the default query.
324324
*
325325
* @param queryString The SQL query string to set
326326
*/
@@ -370,7 +370,7 @@ protected boolean isUsernameBasedPrimaryKey() {
370370
* Allows the default query string used to retrieve users based on username to be
371371
* overridden, if default table or column names need to be changed. The default query
372372
* is {@link #DEF_USERS_BY_USERNAME_QUERY}; when modifying this query, ensure that all
373-
* returned columns are mapped back to the same column names as in the default query.
373+
* returned columns are mapped back to the same column positions as in the default query.
374374
* If the 'enabled' column does not exist in the source database, a permanent true
375375
* value for this column may be returned by using a query similar to
376376
*

crypto/src/main/java/org/springframework/security/crypto/password/LdapShaPasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
* @deprecated Digest based password encoding is not considered secure. Instead use an
4040
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
4141
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
42-
* password upgrades.
42+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
43+
* that this is a legacy implementation and using it is considered insecure.
4344
*/
4445
@Deprecated
4546
public class LdapShaPasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/Md4PasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
* @deprecated Digest based password encoding is not considered secure. Instead use an
7474
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
7575
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
76-
* password upgrades.
76+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
77+
* that this is a legacy implementation and using it is considered insecure.
7778
*/
7879
@Deprecated
7980
public class Md4PasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/MessageDigestPasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
* @deprecated Digest based password encoding is not considered secure. Instead use an
7777
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
7878
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
79-
* password upgrades.
79+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
80+
* that this is a legacy implementation and using it is considered insecure.
8081
*/
8182
@Deprecated
8283
public class MessageDigestPasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/StandardPasswordEncoder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
* @author Keith Donald
4242
* @author Luke Taylor
4343
* @deprecated Digest based password encoding is not considered secure. Instead use an
44-
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
44+
* adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
4545
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
46-
* password upgrades.
46+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
47+
* that this is a legacy implementation and using it is considered insecure.
4748
*/
4849
@Deprecated
4950
public final class StandardPasswordEncoder implements PasswordEncoder {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
gaeVersion=1.9.62
2-
springBootVersion=2.0.0.RELEASE
1+
gaeVersion=1.9.63
2+
springBootVersion=2.0.1.RELEASE
33
version=5.1.0.BUILD-SNAPSHOT

gradle/dependency-management.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if (!project.hasProperty('reactorVersion')) {
33
}
44

55
if (!project.hasProperty('springVersion')) {
6-
ext.springVersion = '5.0.4.RELEASE'
6+
ext.springVersion = '5.0.6.BUILD-SNAPSHOT'
77
}
88

99
if (!project.hasProperty('springDataVersion')) {
@@ -45,7 +45,7 @@ dependencyManagement {
4545
dependency 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
4646
dependency 'com.fasterxml:classmate:1.3.4'
4747
dependency 'com.github.stephenc.jcip:jcip-annotations:1.0-1'
48-
dependency 'com.google.appengine:appengine-api-1.0-sdk:1.9.62'
48+
dependency 'com.google.appengine:appengine-api-1.0-sdk:1.9.63'
4949
dependency 'com.google.appengine:appengine-api-labs:1.9.63'
5050
dependency 'com.google.appengine:appengine-api-stubs:1.9.63'
5151
dependency 'com.google.appengine:appengine-testing:1.9.63'
@@ -54,8 +54,8 @@ dependencyManagement {
5454
dependency 'com.google.guava:guava:20.0'
5555
dependency 'com.google.inject:guice:3.0'
5656
dependency 'com.nimbusds:lang-tag:1.4.3'
57-
dependency 'com.nimbusds:nimbus-jose-jwt:5.9'
58-
dependency 'com.nimbusds:oauth2-oidc-sdk:5.57'
57+
dependency 'com.nimbusds:nimbus-jose-jwt:5.10'
58+
dependency 'com.nimbusds:oauth2-oidc-sdk:5.61'
5959
dependency 'com.squareup.okhttp3:okhttp:3.9.0'
6060
dependency 'com.squareup.okio:okio:1.13.0'
6161
dependency 'com.sun.xml.bind:jaxb-core:2.3.0'
@@ -76,7 +76,7 @@ dependencyManagement {
7676
dependency 'javax.mail:mail:1.4.7'
7777
dependency 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1'
7878
dependency 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02'
79-
dependency 'javax.servlet:javax.servlet-api:4.0.0'
79+
dependency 'javax.servlet:javax.servlet-api:4.0.1'
8080
dependency 'javax.validation:validation-api:2.0.1.Final'
8181
dependency 'javax.xml.bind:jaxb-api:2.3.0'
8282
dependency 'junit:junit:4.12'
@@ -89,7 +89,7 @@ dependencyManagement {
8989
dependency 'net.sf.ehcache:ehcache:2.10.4'
9090
dependency 'net.sourceforge.cssparser:cssparser:0.9.24'
9191
dependency 'net.sourceforge.htmlunit:htmlunit-core-js:2.28'
92-
dependency 'net.sourceforge.htmlunit:htmlunit:2.29'
92+
dependency 'net.sourceforge.htmlunit:htmlunit:2.30'
9393
dependency 'net.sourceforge.htmlunit:neko-htmlunit:2.28'
9494
dependency 'net.sourceforge.nekohtml:nekohtml:1.9.22'
9595
dependency 'nz.net.ultraq.thymeleaf:thymeleaf-expression-processor:1.1.3'
@@ -142,9 +142,9 @@ dependencyManagement {
142142
dependency 'org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.0.44'
143143
dependency 'org.apache.tomcat.embed:tomcat-embed-websocket:8.5.23'
144144
dependency 'org.apache.tomcat:tomcat-annotations-api:8.5.23'
145-
dependency 'org.aspectj:aspectjrt:1.9.0.RC2'
146-
dependency 'org.aspectj:aspectjtools:1.9.0.RC2'
147-
dependency 'org.aspectj:aspectjweaver:1.8.13'
145+
dependency 'org.aspectj:aspectjrt:1.9.1'
146+
dependency 'org.aspectj:aspectjtools:1.9.1'
147+
dependency 'org.aspectj:aspectjweaver:1.9.1'
148148
dependency 'org.assertj:assertj-core:3.9.1'
149149
dependency 'org.attoparser:attoparser:2.0.4.RELEASE'
150150
dependency 'org.bouncycastle:bcpkix-jdk15on:1.59'
@@ -181,15 +181,15 @@ dependencyManagement {
181181
dependency 'org.jboss.logging:jboss-logging:3.3.1.Final'
182182
dependency 'org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.1.Final'
183183
dependency 'org.jboss:jandex:2.0.3.Final'
184-
dependency 'org.mockito:mockito-core:2.17.0'
184+
dependency 'org.mockito:mockito-core:2.18.3'
185185
dependency 'org.objenesis:objenesis:2.6'
186186
dependency 'org.openid4java:openid4java-nodeps:0.9.6'
187187
dependency 'org.ow2.asm:asm:6.0'
188188
dependency 'org.reactivestreams:reactive-streams:1.0.1'
189-
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.29.2'
189+
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.30.0'
190190
dependency 'org.seleniumhq.selenium:selenium-api:3.8.1'
191-
dependency 'org.seleniumhq.selenium:selenium-java:3.9.1'
192-
dependency 'org.seleniumhq.selenium:selenium-support:3.9.1'
191+
dependency 'org.seleniumhq.selenium:selenium-java:3.11.0'
192+
dependency 'org.seleniumhq.selenium:selenium-support:3.11.0'
193193
dependency 'org.skyscreamer:jsonassert:1.5.0'
194194
dependency 'org.slf4j:jcl-over-slf4j:1.7.25'
195195
dependency 'org.slf4j:jul-to-slf4j:1.7.25'

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/oidc/userinfo/NimbusUserInfoResponseClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import com.nimbusds.openid.connect.sdk.UserInfoRequest;
2525
import org.springframework.core.ParameterizedTypeReference;
2626
import org.springframework.http.HttpHeaders;
27+
import org.springframework.http.MediaType;
2728
import org.springframework.http.client.AbstractClientHttpResponse;
2829
import org.springframework.http.client.ClientHttpResponse;
2930
import org.springframework.http.converter.GenericHttpMessageConverter;
@@ -84,6 +85,7 @@ private ClientHttpResponse getUserInfoResponse(ClientRegistration clientRegistra
8485

8586
UserInfoRequest userInfoRequest = new UserInfoRequest(userInfoUri, accessToken);
8687
HTTPRequest httpRequest = userInfoRequest.toHTTPRequest();
88+
httpRequest.setAccept(MediaType.APPLICATION_JSON_VALUE);
8789
httpRequest.setConnectTimeout(30000);
8890
httpRequest.setReadTimeout(30000);
8991
HTTPResponse httpResponse;

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/NimbusUserInfoResponseClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
import com.nimbusds.openid.connect.sdk.UserInfoRequest;
2525
import org.springframework.core.ParameterizedTypeReference;
2626
import org.springframework.http.HttpHeaders;
27+
import org.springframework.http.MediaType;
2728
import org.springframework.http.client.AbstractClientHttpResponse;
2829
import org.springframework.http.client.ClientHttpResponse;
2930
import org.springframework.http.converter.GenericHttpMessageConverter;
@@ -81,6 +82,7 @@ private ClientHttpResponse getUserInfoResponse(ClientRegistration clientRegistra
8182

8283
UserInfoRequest userInfoRequest = new UserInfoRequest(userInfoUri, accessToken);
8384
HTTPRequest httpRequest = userInfoRequest.toHTTPRequest();
85+
httpRequest.setAccept(MediaType.APPLICATION_JSON_VALUE);
8486
httpRequest.setConnectTimeout(30000);
8587
httpRequest.setReadTimeout(30000);
8688
HTTPResponse httpResponse;

0 commit comments

Comments
 (0)