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

CRM-17959 - allow URL to be redirected if the queue ID is invalid but… #7728

Merged
merged 1 commit into from
Jun 5, 2016
Merged

CRM-17959 - allow URL to be redirected if the queue ID is invalid but… #7728

merged 1 commit into from
Jun 5, 2016

Conversation

andrew-cormick-dockery
Copy link
Contributor

… the URL ID is OK

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@seamuslee001
Copy link
Contributor

Jenkins test this please

Note this should still get core teams's eyes on it

@totten
Copy link
Member

totten commented Feb 3, 2016

jenkins, add to whitelist

@seamuslee001
Copy link
Contributor

Test failures look unrelated to this PR @totten perhaps related to change in phpunit?

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton
Copy link
Contributor

@totten I think this is OK - any concerns from your side? $turl is not user input so the lack of escaping seems OK

@eileenmcnaughton eileenmcnaughton changed the title CRM-17959 - allow URL to be redirected if the queue ID is invalid but… [ready for core team review] CRM-17959 - allow URL to be redirected if the queue ID is invalid but… Feb 16, 2016
@mlutfy mlutfy changed the title [ready for core team review] CRM-17959 - allow URL to be redirected if the queue ID is invalid but… CRM-17959 - allow URL to be redirected if the queue ID is invalid but… Jun 4, 2016
@kcristiano
Copy link
Member

tested PR:

Steps to reproduce:

  • Create a mailing with external links (eg https://civicrm.org)
  • Send mailing
  • test that links work properly
  • delete rows from civicrm_mailing_event_queue table
  • Click links in email again- expected behavior is redirect to sites home page

Condition Reproduced.

Applied patch - Manually. Note @totten doing hub checkout rolled CiviCRM back to a prior version and introduced an unrelated error. Therefore, cherry picking or applying the patch was the only way to go here.

After Patch perform the following steps:

  • Go back to email
  • click links in email
  • They now are resolved properly

Further tests:

  • deleted row from civicrm_mailing_trackable_url - Note ID
  • Find that ID in email click on that link. Expected to be redirected to home page
  • works properly

Also verified with WordPress and Joomla

@eileenmcnaughton PR looks good to merge.

@mlutfy
Copy link
Member

mlutfy commented Jun 5, 2016

Discussed with @seamuslee001, we should use CRM_Utils_Rule::mysqlColumnNameOrAlias() to filter the variable in the SQL query.

We will discuss with Tim and probably open a followup PR to address this.

@eileenmcnaughton
Copy link
Contributor

Thanks guys!

@mlutfy
Copy link
Member

mlutfy commented Jun 8, 2016

For reference, followup SQL fix and test added in : #8516

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.

7 participants