1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-23 06:35:34 +00:00

fix query urls (with ? on end)

This commit is contained in:
fosslinux 2019-05-06 14:17:06 +10:00
parent 305aa6a5cd
commit 6d1c711537

4
file.c
View File

@ -103,7 +103,6 @@ void send_text_file(state *st)
void url_redirect(state *st)
{
char dest[BUFSIZE];
char *c;
/* Basic security checking */
sstrlcpy(dest, st->req_selector + 4);
@ -114,9 +113,6 @@ void url_redirect(state *st)
sstrncmp(dest, "mailto:") != MATCH)
die(st, ERR_ACCESS, "Refusing to HTTP redirect unsafe protocols");
if ((c = strchr(dest, '"'))) *c = '\0';
if ((c = strchr(dest, '?'))) *c = '\0';
/* Log the redirect */
if (st->opt_syslog) {
syslog(LOG_INFO, "request for \"gopher%s://%s:%i/h%s\" from %s",