fix(subscribe): improve short token validation by adding case-insensitive comparison
This commit is contained in:
parent
77a5373d44
commit
24f3c29fad
@ -37,7 +37,8 @@ func SubscribeHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if short != domainArr[0] {
|
||||
if strings.ToLower(short) != strings.ToLower(domainArr[0]) {
|
||||
logger.Debugf("[SubscribeHandler] Generate short token failed, short: %s, domain: %s", short, domainArr[0])
|
||||
c.String(http.StatusForbidden, "Access denied")
|
||||
c.Abort()
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user