Skip to content

Conversation

@ChisomOkwor
Copy link
Contributor

This PR displays the actual participants addresses.
It's a draft, as I'm awaiting #35 Ved's merge.

  1. If the user manually inputs their address, it's stored in data-store and displayed on the participant page.
  2. If the user chooses to use the HTML Geo-location, the reverse Geo-coding API converts the coordinate to an actual address, which is also stored in datastore and displayed on the participant page.

@ChisomOkwor ChisomOkwor marked this pull request as ready for review August 4, 2020 01:37
}

// This number should be kept in sync with the port number in nodemon.json
app.get(`${PREFIX_API}/reverseGeocode`, async (request, response) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

something that hadn't occurred to me earlier - are you essentially allowing anyone to make free geocode requests and spend your money? could i just point my own external code at this endpoint to make geocode requests with your API key, or is this somehow blocked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite sure, but I think there's a possibility that could happen. But either way it's done, the geo-coded location always shows up on the participant page. A hacker could still access it there? I'm wondering because I thought this works the same way the place search works. Or is this different because the goecoded address is in the JS frontend?

Copy link
Contributor

Choose a reason for hiding this comment

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

the difference is between a malicious user being able to geocode only address that the user has entered vs being able to geocode any arbitrary address. ideally this should be designed such that it's only possible to geocode addresses that are being entered into the db - ie a hacker would have to actually be using your app, and you could easily apply rate limiting, etc.

@ChisomOkwor ChisomOkwor requested review from skzv and vedantroy August 4, 2020 13:46
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.

4 participants