Fix #76129 - remove more potential unfiltered outputs for phar

This commit is contained in:
Stanislav Malyshev 2018-03-27 21:22:28 -07:00
parent e2dcf3cc54
commit 6e64aba47f
13 changed files with 14 additions and 16 deletions

View File

@ -340,8 +340,7 @@ static void phar_do_403(char *entry, int entry_len TSRMLS_DC) /* {{{ */
sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
sapi_send_headers(TSRMLS_C);
PHPWRITE("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ", sizeof("<html>\n <head>\n <title>Access Denied</title>\n </head>\n <body>\n <h1>403 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Access Denied</h1>\n </body>\n</html>", sizeof(" Access Denied</h1>\n </body>\n</html>") - 1);
PHPWRITE("Access Denied</h1>\n </body>\n</html>", sizeof("Access Denied</h1>\n </body>\n</html>") - 1);
}
/* }}} */
@ -365,8 +364,7 @@ static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, cha
sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
sapi_send_headers(TSRMLS_C);
PHPWRITE("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ", sizeof("<html>\n <head>\n <title>File Not Found</title>\n </head>\n <body>\n <h1>404 - File ") - 1);
PHPWRITE(entry, entry_len);
PHPWRITE(" Not Found</h1>\n </body>\n</html>", sizeof(" Not Found</h1>\n </body>\n</html>") - 1);
PHPWRITE("Not Found</h1>\n </body>\n</html>", sizeof("Not Found</h1>\n </body>\n</html>") - 1);
}
/* }}} */

View File

@ -20,6 +20,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>

View File

@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -18,6 +18,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>

View File

@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>

View File

@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -19,6 +19,6 @@ Status: 403 Access Denied
<title>Access Denied</title>
</head>
<body>
<h1>403 - File /hi Access Denied</h1>
<h1>403 - File Access Denied</h1>
</body>
</html>

View File

@ -17,6 +17,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /notfound.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>

View File

@ -16,6 +16,6 @@ Status: 404 Not Found
<title>File Not Found</title>
</head>
<body>
<h1>404 - File /index.php Not Found</h1>
<h1>404 - File Not Found</h1>
</body>
</html>