Skip to content

Commit

Permalink
improve token-id format to make it more secure
Browse files Browse the repository at this point in the history
  • Loading branch information
vbanthia committed Dec 3, 2015
1 parent 8a342da commit 6d99bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/units/websocket/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ module.exports = function(options) {
, secret: options.secret
})

var tokenId = uuid.v4()
var tokenId = util.format('%s-%s', uuid.v4(), uuid.v4()).replace(/-/g, '')
, title = data.title

return dbapi.saveUserAccessToken(user.email, {
Expand Down
2 changes: 1 addition & 1 deletion res/app/settings/keys/access-tokens/access-tokens.jade
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
textarea(readonly, rows='1', text-focus-select, ng-model='newToken.tokenId').form-control.token-id-textarea

ul.list-group.key-list
li.list-group-item(ng-repeat='title in accessTokenTitles').animate-repeat
li.list-group-item(ng-repeat='title in accessTokenTitles track by $index').animate-repeat
a
i.fa.fa-key.fa-2x.fa-fw.key-list-icon
.key-list-details.selectable
Expand Down

0 comments on commit 6d99bac

Please sign in to comment.