mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
fix(auth/templates): 修复模板中request.contextPath的空指针问题
- 在confirm.ftl和login.ftl模板中增加request对象判空逻辑 - 优化OAuth2授权和登录表单的action路径安全性
This commit is contained in:
1 parent
880652f62c
commit
6c8e257a1e
2 files changed
+3
-2
No files matched your search
@@ -18,7 +18,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id='confirmationForm' name='confirmationForm' action="${request.contextPath}/oauth2/authorize" method='post'>
|
||||
<form id='confirmationForm' name='confirmationForm'
|
||||
action="<#if request??>${request.contextPath!}</#if>/oauth2/authorize" method='post'>
|
||||
<input type="hidden" name="client_id" value="${clientId}">
|
||||
<input type="hidden" name="state" value="${state}">
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<p class="mt-2 text-sm text-gray-600 dark:text-gray-400">安全便捷的企业级认证服务</p>
|
||||
</div>
|
||||
|
||||
<form class="form-signin" action="${request.contextPath}/oauth2/form" method="post">
|
||||
<form class="form-signin" action="<#if request??>${request.contextPath!}</#if>/oauth2/form" method="post">
|
||||
<input type="hidden" name="client_id" value="pig">
|
||||
<input type="hidden" name="grant_type" value="password">
|
||||
<div class="space-y-6">
|
||||
|
||||
Reference in new issue
Block a user