1 // Copyright (2013) Jann Horn <jann@thejh.net>
2 // This code is licensed under the AGPLv3.
8 void check_map_name(void) {
9 if (map == NULL) senderr("missing query string", false);
10 for (char *p = map; *p; p++) {
11 if (*p >= 'a' && *p <= 'z') continue;
12 if (*p >= 'A' && *p <= 'Z') continue;
13 if (*p >= '0' && *p <= '9') continue;
14 if (*p == '_') continue;
15 senderr("bad map name", false);
20 map = getenv("QUERY_STRING");
23 char cmd[4+strlen(map)+1];
24 memcpy(cmd, "map ", 4);
28 puts("Status: 204 changed map"
29 "\nX-Frame-Options: DENY"