Skip to content

Commit 4e9c37b

Browse files
committed
Manual URL Cleanup
1 parent 9b09201 commit 4e9c37b

File tree

17 files changed

+475
-484
lines changed

17 files changed

+475
-484
lines changed

.github/ISSUE_REPLY_TEMPLATES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33

44
It would be very helpful if you could provide a complete and minimal sample that reproduces the issue and share it via a GitHub repository. This will allow us to efficiently troubleshoot and help resolve the issue. The sample should contain the minimum amount of code to reproduce the issue along with detailed steps on how to reproduce. Please see the following references for what a complete and minimal sample should consist of.
55

6-
- http://sscce.org/
76
- https://stackoverflow.com/help/mcve

config/src/test/java/org/springframework/security/config/http/OpenIDConfigTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void requestWhenOpenIDAndRememberMeConfiguredThenRememberMePassedToIdp()
119119

120120
OpenIDAuthenticationFilter openIDFilter = getFilter(OpenIDAuthenticationFilter.class);
121121

122-
String openIdEndpointUrl = "http://testopenid.com?openid.return_to=";
122+
String openIdEndpointUrl = "https://testopenid.com?openid.return_to=";
123123
Set<String> returnToUrlParameters = new HashSet<>();
124124
returnToUrlParameters.add(AbstractRememberMeServices.DEFAULT_PARAMETER);
125125
openIDFilter.setReturnToUrlParameters(returnToUrlParameters);
@@ -142,7 +142,7 @@ public void requestWhenOpenIDAndRememberMeConfiguredThenRememberMePassedToIdp()
142142
.andExpect(content().string(containsString(AbstractRememberMeServices.DEFAULT_PARAMETER)));
143143

144144
this.mvc.perform(get("/login/openid")
145-
.param(OpenIDAuthenticationFilter.DEFAULT_CLAIMED_IDENTITY_FIELD, "http://ww1.openid.com")
145+
.param(OpenIDAuthenticationFilter.DEFAULT_CLAIMED_IDENTITY_FIELD, "https://ww1.openid.com")
146146
.param(AbstractRememberMeServices.DEFAULT_PARAMETER, "on"))
147147
.andExpect(status().isFound())
148148
.andExpect(redirectedUrl(openIdEndpointUrl + expectedReturnTo));

config/src/test/resources/org/springframework/security/config/http/HttpHeadersConfigTests-DefaultsDisabledWithPlaceholder.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
~ you may not use this file except in compliance with the License.
77
~ You may obtain a copy of the License at
88
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~ https://www.apache.org/licenses/LICENSE-2.0
1010
~
1111
~ Unless required by applicable law or agreed to in writing, software
1212
~ distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,9 +20,9 @@
2020
xmlns="http://www.springframework.org/schema/security"
2121
xsi:schemaLocation="
2222
http://www.springframework.org/schema/security
23-
http://www.springframework.org/schema/security/spring-security.xsd
23+
https://www.springframework.org/schema/security/spring-security.xsd
2424
http://www.springframework.org/schema/beans
25-
http://www.springframework.org/schema/beans/spring-beans.xsd">
25+
https://www.springframework.org/schema/beans/spring-beans.xsd">
2626

2727
<http auto-config="true">
2828
<headers defaults-disabled="${security.headers.defaults.disabled}"/>

config/src/test/resources/org/springframework/security/config/http/HttpHeadersConfigTests-DisabledWithPlaceholder.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
~ you may not use this file except in compliance with the License.
77
~ You may obtain a copy of the License at
88
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~ https://www.apache.org/licenses/LICENSE-2.0
1010
~
1111
~ Unless required by applicable law or agreed to in writing, software
1212
~ distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,9 +20,9 @@
2020
xmlns="http://www.springframework.org/schema/security"
2121
xsi:schemaLocation="
2222
http://www.springframework.org/schema/security
23-
http://www.springframework.org/schema/security/spring-security.xsd
23+
https://www.springframework.org/schema/security/spring-security.xsd
2424
http://www.springframework.org/schema/beans
25-
http://www.springframework.org/schema/beans/spring-beans.xsd">
25+
https://www.springframework.org/schema/beans/spring-beans.xsd">
2626

2727
<http auto-config="true">
2828
<headers disabled="${security.headers.disabled}" />

crypto/src/main/java/org/springframework/security/crypto/codec/Base64.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,16 @@ public final class Base64 {
4444
/**
4545
* Encode using Base64-like encoding that is URL- and Filename-safe as described in
4646
* Section 4 of RFC3548: <a
47-
* href="http://www.faqs.org/rfcs/rfc3548.html">https://www.faqs
48-
* .org/rfcs/rfc3548.html</a>. It is important to note that data encoded this way is
47+
* href="https://tools.ietf.org/html/rfc3548">https://tools.ietf.org/html/rfc3548</a>.
48+
* It is important to note that data encoded this way is
4949
* <em>not</em> officially valid Base64, or at the very least should not be called
5050
* Base64 without also specifying that is was encoded using the URL- and Filename-safe
5151
* dialect.
5252
*/
5353
public final static int URL_SAFE = 16;
5454

5555
/**
56-
* Encode using the special "ordered" dialect of Base64 described here: <a
57-
* href="http://www.faqs.org/qa/rfcc-1940.html"
58-
* >http://www.faqs.org/qa/rfcc-1940.html</a>.
56+
* Encode using the special "ordered" dialect of Base64.
5957
*/
6058
public final static int ORDERED = 32;
6159

@@ -131,7 +129,7 @@ public final class Base64 {
131129
/**
132130
* Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: <a
133131
* href
134-
* ="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.
132+
* ="https://tools.ietf.org/html/rfc3548">https://tools.ietf.org/html/rfc3548</a>.
135133
* Notice that the last two bytes become "hyphen" and "underscore" instead of "plus"
136134
* and "slash."
137135
*/
@@ -191,12 +189,6 @@ public final class Base64 {
191189

192190
/* ******** O R D E R E D B A S E 6 4 A L P H A B E T ******** */
193191

194-
/**
195-
* I don't get the point of this technique, but someone requested it, and it is
196-
* described here: <a
197-
* href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/faqs/
198-
* qa/rfcc-1940.html</a>.
199-
*/
200192
private final static byte[] _ORDERED_ALPHABET = { (byte) '-', (byte) '0', (byte) '1',
201193
(byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7',
202194
(byte) '8', (byte) '9', (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D',

docs/manual/src/docs/asciidoc/_includes/servlet/web/csrf.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ $(document).ajaxSend(function(e, xhr, options) {
257257
});
258258
----
259259

260-
As an alternative to jQuery, we recommend using http://cujojs.com/[cujoJS's] rest.js.
260+
As an alternative to jQuery, we recommend using https://github.com/cujojs[cujoJS's] rest.js.
261261
The https://github.com/cujojs/rest[rest.js] module provides advanced support for working with HTTP requests and responses in RESTful ways.
262262
A core capability is the ability to contextualize the HTTP client adding behavior as needed by chaining interceptors on to the client.
263263

openid/src/main/java/org/springframework/security/openid/OpenIDAuthenticationFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ protected String obtainUsername(HttpServletRequest req) {
254254
*
255255
* If no mapping is provided then the returnToUrl will be parsed to extract the
256256
* protocol, hostname and port followed by a trailing slash. This means that
257-
* <tt>https://www.example.com/login/openid</tt> will automatically become
258-
* <tt>http://www.example.com:80/</tt>
257+
* <tt>https://foo.example.com/login/openid</tt> will automatically become
258+
* <tt>http://foo.example.com:80/</tt>
259259
*
260260
* @param realmMapping containing returnToUrl -&gt; realm mappings
261261
*/

remoting/src/test/java/org/springframework/security/remoting/httpinvoker/AuthenticationSimpleHttpInvokerRequestExecutorTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public void testNormalOperation() throws Exception {
5757
// Create a connection and ensure our executor sets its
5858
// properties correctly
5959
AuthenticationSimpleHttpInvokerRequestExecutor executor = new AuthenticationSimpleHttpInvokerRequestExecutor();
60-
HttpURLConnection conn = new MockHttpURLConnection(new URL("http://localhost/"));
60+
HttpURLConnection conn = new MockHttpURLConnection(new URL("https://localhost/"));
6161
executor.prepareConnection(conn, 10);
6262

6363
// Check connection properties
64-
// See http://www.faqs.org/rfcs/rfc1945.html section 11.1 for example
64+
// See https://tools.ietf.org/html/rfc1945 section 11.1 for example
6565
// we are comparing against
6666
assertThat(conn.getRequestProperty("Authorization")).isEqualTo(
6767
"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
@@ -74,7 +74,7 @@ public void testNullContextHolderIsNull() throws Exception {
7474
// Create a connection and ensure our executor sets its
7575
// properties correctly
7676
AuthenticationSimpleHttpInvokerRequestExecutor executor = new AuthenticationSimpleHttpInvokerRequestExecutor();
77-
HttpURLConnection conn = new MockHttpURLConnection(new URL("http://localhost/"));
77+
HttpURLConnection conn = new MockHttpURLConnection(new URL("https://localhost/"));
7878
executor.prepareConnection(conn, 10);
7979

8080
// Check connection properties (shouldn't be an Authorization header)
@@ -91,7 +91,7 @@ public void testNullContextHolderWhenAnonymous() throws Exception {
9191
// Create a connection and ensure our executor sets its
9292
// properties correctly
9393
AuthenticationSimpleHttpInvokerRequestExecutor executor = new AuthenticationSimpleHttpInvokerRequestExecutor();
94-
HttpURLConnection conn = new MockHttpURLConnection(new URL("http://localhost/"));
94+
HttpURLConnection conn = new MockHttpURLConnection(new URL("https://localhost/"));
9595
executor.prepareConnection(conn, 10);
9696

9797
// Check connection properties (shouldn't be an Authorization header)

samples/javaconfig/hellojs/src/main/resources/resources/js/jquery-1.8.3.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ jQuery.ready.promise = function( obj ) {
881881

882882
try {
883883
// Use the trick by Diego Perini
884-
// http://javascript.nwbox.com/IEContentLoaded/
884+
// https://javascript.nwbox.com/IEContentLoaded/
885885
top.doScroll("left");
886886
} catch(e) {
887887
return setTimeout( doScrollCheck, 50 );
@@ -1390,7 +1390,7 @@ jQuery.support = (function() {
13901390
fragment.appendChild( div );
13911391

13921392
// Technique from Juriy Zaytsev
1393-
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
1393+
// https://perfectionkills.com/detecting-event-support-without-browser-sniffing/
13941394
// We only care about the case where non-standard event systems
13951395
// are used, namely in IE. Short-circuiting here helps us to
13961396
// avoid an eval call (in setAttribute) which can cause CSP
@@ -1945,7 +1945,7 @@ jQuery.fn.extend({
19451945
});
19461946
},
19471947
// Based off of the plugin by Clint Helfers, with permission.
1948-
// http://blindsignals.com
1948+
// https://blindsignals.com
19491949
delay: function( time, type ) {
19501950
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
19511951
type = type || "fx";
@@ -6867,7 +6867,7 @@ if ( window.getComputedStyle ) {
68676867
}
68686868

68696869
// From the awesome hack by Dean Edwards
6870-
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
6870+
// https://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
68716871

68726872
// If we're not dealing with a regular pixel number
68736873
// but a number that has a weird ending, we need to convert it to pixels
@@ -9469,4 +9469,4 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
94699469
define( "jquery", [], function () { return jQuery; } );
94709470
}
94719471

9472-
})( window );
9472+
})( window );

0 commit comments

Comments
 (0)