Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKAN not working with guzzle #270

Open
emteknetnz opened this issue Jul 20, 2022 · 10 comments
Open

CKAN not working with guzzle #270

emteknetnz opened this issue Jul 20, 2022 · 10 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Jul 20, 2022

https://github.com/silverstripe/silverstripe-ckan-registry/runs/7419517559?check_suite_focus=true

Failing behat test (also fails manual testing) where the server will send a guzzle request to https://catalogue.data.govt.nz/dataset/directory-of-educational-institutions

This website has imperva in-front of it which intentionally sends back an invalid __utmv header https://stackoverflow.com/a/62407633

Guzzle psr(used by guzzle) throws an exception because of this header https://github.com/guzzle/psr7/blob/1.x/src/MessageTrait.php#L267

        if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
            throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
        }

We could also update ckan to use something other than guzzle

@emteknetnz
Copy link
Member Author

emteknetnz commented Jul 27, 2022

Issue is not resolved with 4.11 / guzzle 7 - still getting the same failure - https://github.com/silverstripe/silverstripe-ckan-registry/runs/7509511643?check_suite_focus=true#step:12:151

@emteknetnz emteknetnz changed the title CKAN not working with guzzle 6 / psr7 1.9 CKAN not working with guzzle Jul 28, 2022
@andrewandante
Copy link

Ticket currently open with Imperva to disable the cookie that is causing this issue - will update once ticket is closed.

@andrewandante
Copy link

Ticket has been resolved, can you re-test?

@GuySartorelli
Copy link
Member

@andrewandante
Copy link

😢 have asked Imperva to check themselves.

@andrewandante
Copy link

It might be worth adding a config option to force HTTP2 as that seems to be a way around the problem - it would at least get the test to pass. Should be able to pass in like this: guzzle/guzzle#1249 (comment)

@andrewandante
Copy link

I've purged the cache at their request, and it's now working for me locally - once more round the block?

@GuySartorelli
Copy link
Member

Still failing in CI https://github.com/silverstripe/silverstripe-ckan-registry/actions/runs/2772250337

"___utmvaEPBuoiEYB=mPn�GQzA; path=/; Max-Age=900; Secure; SameSite=None" is not valid header value

@emteknetnz
Copy link
Member Author

I've noticed this seems to fail sporadically, though more failures than non-failures - seems that Imperva does not consistently send the malformed header?

@andrewandante
Copy link

Update: Imperva fix needs to be applied to a different site, not under our control - have engaged the third party responsible, hopefully to be resolved soon 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants