Use generated id in the returned url, if in use #59

Merged
jonasfj merged 1 commits from patch-1 into master 2017-12-10 16:35:45 +00:00
jonasfj commented 2017-03-18 22:19:59 +00:00 (Migrated from github.com)

Seems like new_client may overwrite the req_id with a generated value, if the id already is in use by another client.

This causes an inconsistency between id and url. This is just a quick fix to make it consistent.

I suspect a proper fix would be some sort of secret_token returned the client that reserves the id. So that other clients can't use it. But that might be overkill, keeping the service simple seems like a good choice :)

Seems like `new_client` may overwrite the `req_id` with a generated value, if the `id` already is in use by another client. This causes an inconsistency between id and url. This is just a quick fix to make it consistent. I suspect a proper fix would be some sort of `secret_token` returned the client that reserves the `id`. So that other clients can't use it. But that might be overkill, keeping the service simple seems like a good choice :)
defunctzombie commented 2017-03-19 00:23:26 +00:00 (Migrated from github.com)

The fix here is to actually return the url that corresponds to the id assigned to the client (in the case where they requested an id which was not available?)

The fix here is to actually return the url that corresponds to the id assigned to the client (in the case where they requested an id which was not available?)
jonasfj commented 2017-03-19 00:32:30 +00:00 (Migrated from github.com)

Yeah, that what this PR does...

It returns the randomly generated id, if the id requested is in use...

Den 18. mar. 2017 5.23 PM skrev "Roman Shtylman" [email protected]:

The fix here is to actually return the url that corresponds to the id
assigned to the client (in the case where they requested an id which was
not available?)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/localtunnel/server/pull/59#issuecomment-287585031,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJI5BZdFOfqF7f6Zl5dQRjfiY93WS6mks5rnHV_gaJpZM4Mhj8F
.

Yeah, that what this PR does... It returns the randomly generated id, if the id requested is in use... Den 18. mar. 2017 5.23 PM skrev "Roman Shtylman" <[email protected]>: > The fix here is to actually return the url that corresponds to the id > assigned to the client (in the case where they requested an id which was > not available?) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/localtunnel/server/pull/59#issuecomment-287585031>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAJI5BZdFOfqF7f6Zl5dQRjfiY93WS6mks5rnHV_gaJpZM4Mhj8F> > . >
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hoelee/server#59