Skip to content

Commit

Permalink
prevent integration of location.href’s hash-param into auth url
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Sep 19, 2017
1 parent 748ceb4 commit e9f1a24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
var Promise = TrelloPowerUp.Promise;
var t = TrelloPowerUp.iframe();

var trelloAuthUrl = 'https://trello.com/1/authorize?expiration=never&name=Comment%20Editor%20by%20AJ&scope=read,write&key=0b15414357140fe88faecea94f0a22b1&callback_method=fragment&return_url=' + encodeURIComponent(window.location.href.replace('auth.html', 'auth-success.html'));
var trelloAuthUrl = 'https://trello.com/1/authorize?expiration=never&name=Comment%20Editor%20by%20AJ&scope=read,write&key=0b15414357140fe88faecea94f0a22b1&callback_method=fragment&return_url=https%3A%2F%2F' + window.location.host + encodeURIComponent(window.location.pathname.replace('auth.html', 'auth-success.html'));

var tokenLooksValid = function(token) {
return /^[0-9a-f]{64}$/.test(token);
}
Expand Down

0 comments on commit e9f1a24

Please sign in to comment.