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

dev/financial#153 Fix redirect to PayPal #18993

Merged

Conversation

Dawnthorn
Copy link
Contributor

@Dawnthorn Dawnthorn commented Nov 19, 2020

Overview

Fixes problem where PayPal redirects to https://cgi-bin/webscr after it's captcha page.

Before

If you clicked on the PayPal button on a donate or event registration form and then PayPal decides to give you it's captcha, PayPal would redirect you to https://cgi-bin/webscr after the captcha.

After

The redirect after filling out PayPal's captcha continues to the next page in PayPal's payment process.

Technical Details

If you put in double slashes in the path part of the PayPal URL and then PayPal asks you to do their captcha, they have some sort of bug where they do the wrong redirect after the captcha to https://cgi-bin/webscr. The URL that CiviCRM uses to send you to PayPal is made up of the configured "url_site" for the PaymentProcess plus a hardcoded path starting with "/cgi-bin/webscr". This change removes the trailing slash from the url_site string if it's there before combining it with the rest of the path.

https://lab.civicrm.org/dev/financial/-/issues/153

If you put in double slashes in the path part of the PayPal URL and then
PayPal asks you to do their captcha, they have some sort of bug where
they do the wrong redirect after the captcha to https://cgi-bin/webscr.

Issue civicrm#153
@civibot
Copy link

civibot bot commented Nov 19, 2020

(Standard links)

@civibot civibot bot added the master label Nov 19, 2020
@eileenmcnaughton
Copy link
Contributor

This is a bit of a painful one to test - but reading the code I feel confident it would only prevent double slashes and not alter anything else - merging

@eileenmcnaughton eileenmcnaughton merged commit 762e29d into civicrm:master Nov 19, 2020
@agileware-justin
Copy link
Contributor

@eileenmcnaughton which CiviCRM release is this going into?

@eileenmcnaughton
Copy link
Contributor

@jusfreeman it was merged before the 5.33 rc was cut so it will be in that

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

Successfully merging this pull request may close these issues.

3 participants