Removed strict comparison on authorization token
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s

This commit is contained in:
dhanabalan
2026-08-25 16:11:29 +05:30
parent a98c41f7b9
commit 4c97a80b44

View File

@@ -3982,7 +3982,7 @@ class CharacteristicsController extends Controller
$headerAuth = $request->header('Authorization'); $headerAuth = $request->header('Authorization');
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw; $expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
if ($headerAuth !== $expectedToken) { if ($headerAuth != $expectedToken) {
return response()->json([ return response()->json([
'status_code' => 'ERROR', 'status_code' => 'ERROR',
'status_description' => 'Invalid authorization token!', 'status_description' => 'Invalid authorization token!',
@@ -4236,7 +4236,7 @@ class CharacteristicsController extends Controller
$headerAuth = $request->header('Authorization'); $headerAuth = $request->header('Authorization');
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw; $expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
if ($headerAuth !== $expectedToken) { if ($headerAuth != $expectedToken) {
return response()->json([ return response()->json([
'status_code' => 'ERROR', 'status_code' => 'ERROR',
'status_description' => 'Invalid authorization token!', 'status_description' => 'Invalid authorization token!',
@@ -5315,7 +5315,7 @@ class CharacteristicsController extends Controller
$headerAuth = $request->header('Authorization'); $headerAuth = $request->header('Authorization');
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw; $expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
if ($headerAuth !== $expectedToken) { if ($headerAuth != $expectedToken) {
return response()->json([ return response()->json([
'status_code' => 'ERROR', 'status_code' => 'ERROR',
'status_description' => 'Invalid authorization token!', 'status_description' => 'Invalid authorization token!',