解析UserId 加一层判断,不知道前端其他啥其他误调用该接口
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0ef7ef675c
commit
0e7bd5f5dd
|
|
@ -279,7 +279,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
|
|
||||||
var isExpire = _tokenService.IsTokenExpired(token);
|
var isExpire = _tokenService.IsTokenExpired(token);
|
||||||
|
|
||||||
if (!await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd) || isExpire)
|
if ( Guid.TryParse(userId,out _) == false || isExpire || !await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd) )
|
||||||
{
|
{
|
||||||
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(I18n.T("UserRedirect_InitializationLinkExpire"))} ";
|
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(I18n.T("UserRedirect_InitializationLinkExpire"))} ";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue