jdaugherty commented on code in PR #15809:
URL: https://github.com/apache/grails-core/pull/15809#discussion_r3554459512


##########
grails-wrapper/src/test/groovy/grails/init/GrailsUpdaterSpec.groovy:
##########
@@ -71,96 +76,132 @@ class GrailsUpdaterSpec extends Specification {
         e.message == 'Redirect response is missing a Location header for 
Grails wrapper remote resource: 
https://repo.example.test/releases/maven-metadata.xml'
     }
 
+    def "remote wrapper redirect rejects malformed location header"() {
+        when:
+        GrailsUpdater.resolveSecureRedirectUrl(new 
URI('https://repo.example.test/releases/maven-metadata.xml'), 'http://[bad')

Review Comment:
   While `repo.example.test` shouldn't resolve, nothing stops github from 
adding a dns entry for this.  We should mock these - nothing prevents the 
environment you run in from resolving it.  Especially true on corporate 
networks that may define a .test domain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to