Changeset 71 in Main for trunk/Server
- Timestamp:
- Sep 19, 2024, 6:28:44 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/server.c
r70 r71 486 486 bool rej = false; 487 487 #ifdef __MINGW32__ 488 char* rpath = cm_strdup(path); 489 for(i = strlen(rpath) - 1; i >= 0; i++) { 490 if(rpath[i] != ':'){ 491 break; 492 } 493 rpath[i] = 0; 494 } 488 495 for(i = 0; i < sizeof(reserved_names) / sizeof(reserved_names[0]); i++) { 489 496 char* n = cm_strcat("/", reserved_names[i]); 490 if(cm_nocase_endswith( path, n)) {497 if(cm_nocase_endswith(rpath, n)) { 491 498 tw_http_error(s, sock, 403, name, port); 492 499 free(n); … … 496 503 } 497 504 free(n); 498 char* y = cm_strcat3("/", reserved_names[i], ":"); 499 if(cm_nocase_endswith(path, y)) { 500 tw_http_error(s, sock, 403, name, port); 501 free(y); 502 rej = true; 503 cm_log("Server", "XP Patch ; rejecting access to device"); 504 break; 505 } 506 free(y); 507 } 505 } 506 free(rpath); 508 507 #endif 509 508 struct stat st;
Note:
See TracChangeset
for help on using the changeset viewer.