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

Use HTTPS URL for event submission to main.php.net, match spam check expectation to web-master #1017

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

iansltx
Copy link
Contributor

@iansltx iansltx commented Jun 22, 2024

Resolves #999 / GH-999

At some point in the past 12 years (this line was modified in the last 3 years but I doubt it got tested when modified) main.php.net started redirecting insecure HTTP to HTTPS, including for POSTs. The catch with those redirects is that POSTs won't get resubmitted when redirected, so when submitting an event the redirect would result in a GET with no parameters to the event submission endpoint, hence "Missing parameters." So event submission has been broken since main.php.net started redirecting HTTP to HTTPS.

Back in 2012 there was an attempt to switch this and other URLs to HTTPS, but it got rolled back because "there could be mirrors without ssl support." (see blame for the line this commit modifies). Since then, mirrors have been phased out, so we can safely assume we're calling HTTPS endpoints now (and that's the only way this will work anyway).

Verified by hitting the mentioned endpoint both on HTTP and HTTPS. HTTP gets redirected and fails due to missing parameters, HTTPS makes it through to the next step.

Additionally swaps the spam check value back to matching the web-master repo's expected value, as once the above was fixed that became the issue for calling the endpoint through this form. Optimizing for having only one repo needing to be fixed here rather than both this repo and the web-master one, hence not changing the expected antispam value there.

Resolves php#999

At some point in the past 12 years (this line was modified in the last 3 years
but I doubt it got tested when modified) main.php.net started redirecting
insecure HTTP to HTTPS, including for POSTs. The catch with those redirects is
that POSTs won't get resubmitted when redirected, so when submitting an event
the redirect would result in a GET with no parameters to the event submission
endpoint, hence "Missing parameters." So event submission has been broken since
main.php.net started redirecting HTTP to HTTPS.

Back in 2012 there was an attempt to switch this and other URLs to HTTPS, but
it got rolled back because "there could be mirrors without ssl support." (see
blame for the line this commit modifies). Since then, mirrors have been phased
out, so we can safely assume we're calling HTTPS endpoints now (and that's the
only way this will work anyway).

Verified by hitting the mentioned endpoint both on HTTP and HTTPS. HTTP gets
redirected and fails due to missing parameters, HTTPS makes it through to the
next step.
Copy link

github-actions bot commented Jun 22, 2024

🚀 Commit fadb53c Deployed on https://web-php-pr-1017.preview.thephp.foundation

This reverts part of f1b8134 as that wasn't quite the right fix
@iansltx iansltx changed the title Use HTTPS URL for event submission to main.php.net Use HTTPS URL for event submission to main.php.net, match spam check expectation to web-master Jun 22, 2024
@iansltx
Copy link
Contributor Author

iansltx commented Jun 22, 2024

Verified in the preview environment by @tiffany-taylor

@tiffany-taylor
Copy link
Member

I tested here https://web-php-pr-1017.preview.thephp.foundation/submit-event.php with dummy form data. First attempt, the spam check in event.php had caught my manual test. @iansltx modified the spam check and array order in submit-event.php, which enabled me to reach the form submission success message on my second manual test. As far as I can tell from testing on my phone, it seems correct.

Copy link
Member

@saundefined saundefined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@saundefined saundefined merged commit bd48730 into php:master Jun 23, 2024
4 checks passed
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.

Event submission form error: "missing some parameters"
4 participants