Merge pull request #1207 from tarvip/sign-in-fragment-fix
Fix URI fragment handling
This commit is contained in:
		
						commit
						67bfa4b43f
					
				|  | @ -11,6 +11,7 @@ | |||
| - [#1108](https://github.com/oauth2-proxy/oauth2-proxy/pull/1108) Add alternative ways to generate cookie secrets to docs (@JoelSpeed) | ||||
| - [#1142](https://github.com/oauth2-proxy/oauth2-proxy/pull/1142) Add pagewriter to upstream proxy (@JoelSpeed) | ||||
| - [#1181](https://github.com/oauth2-proxy/oauth2-proxy/pull/1181) Fix incorrect `cfg` name in show-debug-on-error flag (@iTaybb) | ||||
| - [#1207](https://github.com/oauth2-proxy/oauth2-proxy/pull/1207) Fix URI fragment handling on sign-in page, regression introduced in 7.1.0 (@tarvip) | ||||
| 
 | ||||
| # V7.1.3 | ||||
| 
 | ||||
|  |  | |||
|  | @ -22,23 +22,6 @@ | |||
|         text-decoration: underline; | ||||
|       } | ||||
|     </style> | ||||
| 
 | ||||
|     <script> | ||||
|       if (window.location.hash) { | ||||
|         (function() { | ||||
|           var inputs = document.getElementsByName('rd'); | ||||
|           for (var i = 0; i < inputs.length; i++) { | ||||
|             // Add hash, but make sure it is only added once | ||||
|             var idx = inputs[i].value.indexOf('#'); | ||||
|             if (idx >= 0) { | ||||
|               // Remove existing hash from URL | ||||
|               inputs[i].value = inputs[i].value.substr(0, idx); | ||||
|             } | ||||
|             inputs[i].value += window.location.hash; | ||||
|           } | ||||
|         })(); | ||||
|       } | ||||
|     </script> | ||||
|   </head> | ||||
|   <body class="has-background-light"> | ||||
|   <section class="section"> | ||||
|  | @ -82,6 +65,23 @@ | |||
|     </div> | ||||
|   </section> | ||||
| 
 | ||||
|   <script> | ||||
|     if (window.location.hash) { | ||||
|       (function() { | ||||
|         var inputs = document.getElementsByName('rd'); | ||||
|         for (var i = 0; i < inputs.length; i++) { | ||||
|           // Add hash, but make sure it is only added once | ||||
|           var idx = inputs[i].value.indexOf('#'); | ||||
|           if (idx >= 0) { | ||||
|             // Remove existing hash from URL | ||||
|             inputs[i].value = inputs[i].value.substr(0, idx); | ||||
|           } | ||||
|           inputs[i].value += window.location.hash; | ||||
|         } | ||||
|       })(); | ||||
|     } | ||||
|   </script> | ||||
| 
 | ||||
|   <footer class="footer has-text-grey has-background-light is-size-7"> | ||||
|     <div class="content has-text-centered"> | ||||
|     	{{ if eq .Footer "-" }} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue