Skip to content
Browse files

Properly encode URI component.

  • Loading branch information...
1 parent 823559a commit 138cc3850d7ab9b06a8679737280cfc17360170d @michael michael committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 _includes/templates/header._
  2. +1 −1 _includes/templates/notification._
View
2 _includes/templates/header._
@@ -19,7 +19,7 @@
<% if (window.authenticated) { %>
<%= app.username %> <a class="logout" href="#">Logout</a>
<% } else { %>
- <a class="button" href="https://github.com/login/oauth/authorize?client_id={{site.oauth_client_id}}&scope=repo,user,gist&redirect_uri=<%= window.location.href %>">Sign in using Github</a>
+ <a class="button" href="https://github.com/login/oauth/authorize?client_id={{site.oauth_client_id}}&scope=repo,user,gist&redirect_uri=<%= encodeURIComponent(window.location.href) %>">Sign in using Github</a>
<% } %>
</div>
<% if (state.file) { %>
View
2 _includes/templates/notification._
@@ -2,7 +2,7 @@
<div class="notification <%= type %>">
Please login with your GitHub account to access that project.
</div>
- <a class="button" href="https://github.com/login/oauth/authorize?client_id={{site.oauth_client_id}}&scope=repo, user&redirect_uri=<%= window.location.href %>">Sign in</a>
+ <a class="button" href="https://github.com/login/oauth/authorize?client_id={{site.oauth_client_id}}&scope=repo, user&redirect_uri=<%= encodeURIComponent(window.location.href) %>">Sign in</a>
<% } else { %>
<div class="notification <%= type %>">
<%= message%>

0 comments on commit 138cc38

Please sign in to comment.
Something went wrong with that request. Please try again.