KenEucker / biketag-vue

A vue app for the game of BikeTag played worldwide at biketag.org including the published biketag-vue component library
https://biketag.org
GNU Affero General Public License v3.0
22 stars 13 forks source link

[BUG] GPS coordinates are saved on the previous round #195

Open cookieguru opened 8 months ago

cookieguru commented 8 months ago

Describe the bug When a player uploads the image for the new round it receives the GPS coordinates for the previous round. i.e. the mystery image for round 123 will have the GPS coordinates based on the location of the found image for round 122

Expected behavior Coordinates are accurate for each image

Additional context Sometimes user will use the context menu of the browser to open the image in a new tab. Often times, Imgur will intercept the request to the jpg and instead redirect to the image's "page" which would reveal the coordinates, allowing cheating. e.g.:

  1. Right click on image, open image in new tab
  2. New tab opened for https://i.imgur.com/example.jpg
  3. Imgur redirects to https://imgur.com/example
  4. Hint text, player name and GPS coordinates are visible on page

Upvote & Fund

Fund with Polar

KenEucker commented 8 months ago

Oh boy. This is going to be a pain to fix. I will have to create a script to correct all of the GPS coordinates (because they are wrong) in addition to correcting the problem in code that creates this.

The hint being visible isn't an issue and the fact that the GPS coordinates are discoverable this way has only now been discovered by you, @cookieguru, years later. I have thought about this for a while and I think the best solution is to encode the GPS coordinates so that they are not human-readable. My only hesitation with this is that it clashes with my desire to have all of the data on Imgur's side be human-readable.

Thanks for reporting this. Any help would be appreciated!

cookieguru commented 8 months ago

I appreciate the compliment that I'm the most observant, but talking to other players I can confirm I'm not the first to notice this :)

KenEucker commented 8 months ago

Putting this idea here for later:

When processing existing tags with updated GPS data, we can modify the unused discussionUrl field for keeping track of which tags have been updated. This will reduce the likelihood that mistakes are made with the data when making these changes.

KenEucker commented 8 months ago

The most recent update includes a fix for the GPS coordinates, ensuring that it is only saved on the previous tag image (found image) when creating a new BikeTag post. This means that the GPS should be accurate moving forward, and only be set on the found image within Imgur.

As for being able to see the GPS coordinates in the uploaded tags in the queue, I think the easiest solution is to have a basic encoding applied to the GPS coordinates as they are saved in the queue. Once a tag is declared the winner, the GPS coordinates will be decoded before updating the previous tag. This will make it so that it is not so easy to copy and paste coordinates found on the image on Imgur. This will take a bit of work with the biketag-api, as well, to support these encoded gps values.