Skip to content

Conversation

@bigmstone
Copy link
Contributor

2.9.3 patch for CORS security fix.

Prior to this commit if you sent a request from an origin not listed in
`allowed_origins` we would respond with `null` for the
`Access-Control-Allow-Origin` header. Per
[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Directives](mozilla's documentation)
null should not be used as some clients will allow the request to go
through. This commit returns the first of our allowed origins if the
requesting origin is not a supported origin.
@Kami
Copy link
Member

Kami commented Mar 6, 2019

To get the build to work I needed to remove lint api spec target - cec76ec.

There were some weird Travis build errors (e.g. https://travis-ci.org/StackStorm/st2/jobs/502377959) due to prance trying to install newer version of requests and that failed with permission error which I couldn't figure out how to fix (without forking and patching prance).

I also tried to remove Travis cache, etc. without success.

If we will encounter same issues in master in the future we might have no choice but to temporary fork prance until we can switch to newer version of requests.

Another approach / workaround would also be to create a separate virtualenv just for prance. This should work fine since it's only used by st2-lint-api-spec target.

Again, nothing worth doing for v2.9.3 (would take too much effort), but something to keep in mind if we encounter similar issues in master.

@Kami
Copy link
Member

Kami commented Mar 6, 2019

I also cherry picked fix from #4505 to avoid Travis unit tests from running 50+ minutes instead of ~15.

@Kami Kami merged commit 3a2f4bf into v2.9 Mar 6, 2019
@Kami Kami deleted the v2.9.3 branch March 6, 2019 07:34
@Kami Kami added this to the 2.9.3 milestone Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants