mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-02-02 15:08:00 -05:00
fix query urls (with ? on end)
This commit is contained in:
parent
305aa6a5cd
commit
6d1c711537
4
file.c
4
file.c
@ -103,7 +103,6 @@ void send_text_file(state *st)
|
|||||||
void url_redirect(state *st)
|
void url_redirect(state *st)
|
||||||
{
|
{
|
||||||
char dest[BUFSIZE];
|
char dest[BUFSIZE];
|
||||||
char *c;
|
|
||||||
|
|
||||||
/* Basic security checking */
|
/* Basic security checking */
|
||||||
sstrlcpy(dest, st->req_selector + 4);
|
sstrlcpy(dest, st->req_selector + 4);
|
||||||
@ -114,9 +113,6 @@ void url_redirect(state *st)
|
|||||||
sstrncmp(dest, "mailto:") != MATCH)
|
sstrncmp(dest, "mailto:") != MATCH)
|
||||||
die(st, ERR_ACCESS, "Refusing to HTTP redirect unsafe protocols");
|
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 */
|
/* Log the redirect */
|
||||||
if (st->opt_syslog) {
|
if (st->opt_syslog) {
|
||||||
syslog(LOG_INFO, "request for \"gopher%s://%s:%i/h%s\" from %s",
|
syslog(LOG_INFO, "request for \"gopher%s://%s:%i/h%s\" from %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user