From 4ed8bfa1ace535152d828bfce6cce980d1d983f7 Mon Sep 17 00:00:00 2001 From: reyk Date: Tue, 15 Jul 2014 09:51:06 +0000 Subject: [PATCH] don't diplay the full path in error messages --- usr.sbin/httpd/server_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c index e8db8a7c08d..1942be13beb 100644 --- a/usr.sbin/httpd/server_file.c +++ b/usr.sbin/httpd/server_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_file.c,v 1.4 2014/07/14 00:19:48 reyk Exp $ */ +/* $OpenBSD: server_file.c,v 1.5 2014/07/15 09:51:06 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -70,6 +70,7 @@ server_file(struct httpd *env, struct client *clt) strlcat(path, "index.html", sizeof(path)); if (access(path, R_OK) == -1) { + strlcpy(path, desc->http_path, sizeof(path)); switch (errno) { case EACCES: server_abort_http(clt, 403, path); -- 2.20.1