@@ -326,8 +326,10 @@ def test_security_check(self, password='password'):
326
326
327
327
# Those URLs should not pass the security check
328
328
for bad_url in ('http://example.com' ,
329
+ 'http:///example.com' ,
329
330
'https://example.com' ,
330
331
'ftp://exampel.com' ,
332
+ '///example.com' ,
331
333
'//example.com' ,
332
334
'javascript:alert("XSS")' ):
333
335
@@ -349,8 +351,8 @@ def test_security_check(self, password='password'):
349
351
'/view/?param=https://example.com' ,
350
352
'/view?param=ftp://exampel.com' ,
351
353
'view/?param=//example.com' ,
352
- 'https:///' ,
353
- 'HTTPS:///' ,
354
+ 'https://testserver /' ,
355
+ 'HTTPS://testserver /' ,
354
356
'//testserver/' ,
355
357
'/url%20with%20spaces/' ): # see ticket #12534
356
358
safe_url = '%(url)s?%(next)s=%(good_url)s' % {
@@ -521,8 +523,10 @@ def test_security_check(self, password='password'):
521
523
522
524
# Those URLs should not pass the security check
523
525
for bad_url in ('http://example.com' ,
526
+ 'http:///example.com' ,
524
527
'https://example.com' ,
525
528
'ftp://exampel.com' ,
529
+ '///example.com' ,
526
530
'//example.com' ,
527
531
'javascript:alert("XSS")' ):
528
532
nasty_url = '%(url)s?%(next)s=%(bad_url)s' % {
@@ -542,8 +546,8 @@ def test_security_check(self, password='password'):
542
546
'/view/?param=https://example.com' ,
543
547
'/view?param=ftp://exampel.com' ,
544
548
'view/?param=//example.com' ,
545
- 'https:///' ,
546
- 'HTTPS:///' ,
549
+ 'https://testserver /' ,
550
+ 'HTTPS://testserver /' ,
547
551
'//testserver/' ,
548
552
'/url%20with%20spaces/' ): # see ticket #12534
549
553
safe_url = '%(url)s?%(next)s=%(good_url)s' % {
0 commit comments