Skip to content

Commit

Permalink
fix(boot2): Allow paths with URL-encoded slashes (#454)
Browse files Browse the repository at this point in the history
Spring Boot 2 tightened up restrictions, but CI job names may legitimately include encoded slashes

See spinnaker/spinnaker#4477
  • Loading branch information
avram authored and ezimanyi committed Jun 17, 2019
1 parent 4cebabb commit d02914a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.core.Ordered
import org.springframework.http.HttpStatus
import org.springframework.security.web.firewall.StrictHttpFirewall
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.ResponseBody
Expand Down Expand Up @@ -78,6 +79,13 @@ class IgorConfig extends WebMvcConfigurerAdapter {
return frb
}

@Bean
StrictHttpFirewall httpFirewall() {
def firewall = new StrictHttpFirewall()
firewall.allowUrlEncodedSlash = true
return firewall
}

@Bean
BuildServices buildServices() {
new BuildServices()
Expand Down

0 comments on commit d02914a

Please sign in to comment.