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

Automatically disable Attendance UI #1055

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

timiwahalahti
Copy link
Collaborator

Camptix Attendance UI must be turned on to reveal attendee info with a link without user authentication. Currently, we trust organisers to disable the UI when they no longer need it. That can lead to the UI being open and the potential of attendee info leakage.

To mitigate the potential issues, this PR automatically disabled the UI after two weeks from generating the code.

It is done simply by saving the time when the secret was generated and comparing that when the link or Camptix settings are visited. If the link is older than two weeks, the UI will be disabled and the secret removed.

This could have been done with a cron job or event, but that just felt too complicated.

Fixes #620

Screenshots

CleanShot 2023-09-21 at 15 08 19@2x CleanShot 2023-09-21 at 15 07 18@2x

How to test the changes in this Pull Request:

  1. Open a WordCamp website dashboard
  2. Navigate to tickets -> setup -> attendance UI wp-admin/edit.php?post_type=tix_ticket&page=camptix_options&tix_section=attendance-ui
  3. Enable and generate a new code
  4. You should be able to see the UI with the link
  5. Temporarily change the expiry by modifying $secret_expiry value (set to 1 second for example)
  6. Try to revisit the link, UI should not be visible
  7. Check that settings have reseted

Copy link
Member

@iandunn iandunn left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@iandunn iandunn merged commit 8d2d601 into WordPress:production Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] CampTix Including addons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically disable Attendance UI after event ends
2 participants