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

node-uuid is url safe? #90

Closed
bjrmatos opened this issue Sep 14, 2014 · 2 comments
Closed

node-uuid is url safe? #90

bjrmatos opened this issue Sep 14, 2014 · 2 comments

Comments

@bjrmatos
Copy link

hello, node-uuid result can be use it in a url?

I mean, if I need to encode it before using it on a url.

var uuid = require ('node-uuid'),
      token = uuid.v4(),
      url; 

// is this ok?
url = 'http://localhost/myurl/' + token; 

// or this:
url = 'http://localhost/myurl/' + functionToBase64url (token);
@broofa
Copy link
Member

broofa commented Sep 15, 2014

No need to URL-encode. Uuids only have 0-9, a-f, and '-'.

See http://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid

@broofa broofa closed this as completed Sep 15, 2014
@bjrmatos
Copy link
Author

Thanks for the aclaration.

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

No branches or pull requests

2 participants