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.
2 parents d078bc3 + ccbb6a5 commit 029c941Copy full SHA for 029c941
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