We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d078bc3 commit ccbb6a5Copy full SHA for ccbb6a5
supervisor/shared/web_workflow/web_workflow.c
@@ -478,8 +478,12 @@ static bool _origin_ok(_request *request) {
478
return true;
479
}
480
// DEBUG: OK if origin is 'localhost' (ignoring port #)
481
- *strchrnul(&request->origin[PREFIX_HTTP_LEN], ':') = '\0';
+ char *cptr = strchrnul(&request->origin[PREFIX_HTTP_LEN], ':');
482
+ char csave = *cptr; // NULL or colon
483
+ *cptr = '\0';
484
if (strcmp(&request->origin[PREFIX_HTTP_LEN], "localhost") == 0) {
485
+ // Restore removed colon if non-null host terminator
486
+ *cptr = csave;
487
488
489
0 commit comments