Actions
Bug #20054
closedif token is invalid, there is no error when doing a PUT
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
using the token from the example
[root@server share]# curl -k -H "X-API-Token: 5YJnb4EenqDHzwx0U0eTPWWhgjTJ8mkk" -H "Content-Type: application/json" -X PUT 'https://localhost/rudder/api/latest/createnode' -d@/tmp/json.json [root@server share]# echo $? 0
but the webapp log say
[2021-10-04 19:50:01+0000] WARN application - REST authentication failed from IP '127.0.0.1|X-Forwarded-For:::1'. Error was: Inconsistency: No registered token '5YJnb4EenqDHzwx0U0eTPWWhgjTJ8mkk'
GET & POST are ok
Updated by Nicolas CHARLES about 3 years ago
- Project changed from 81 to Rudder
- Subject changed from if token is invalid, there is no error when creating a node to if token is invalid, there is no error when doing a PUT
- Description updated (diff)
- Target version deleted (
7.0-1.6)
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 6.2.12 to 6.2.13
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.2.13 to 6.2.14
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.2.14 to 6.2.15
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.2.15 to 6.2.16
Updated by Alexis Mousset over 2 years ago
- Target version changed from 6.2.16 to 6.2.17
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 6.2.17 to 997
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 997 to 6.2.18
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 6.2.18 to 6.2.19
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 6.2.19 to 6.2.20
Updated by Vincent MEMBRÉ about 2 years ago
- Target version changed from 6.2.20 to old 6.2 issues to relocate
Updated by François ARMAND over 1 year ago
- Status changed from New to Rejected
- Regression set to No
This is the expected behavior of curl, it returns 0 if the request was correctly processed, whatever the HTTP code.
If you want to get curl to fail on 4xx and 5xx response, you need to use --fail-with-body
parameter
Actions