mirror of
https://github.com/php/php-src.git
synced 2024-12-13 11:54:45 +08:00
Fix #76129 - remove more potential unfiltered outputs for phar
This commit is contained in:
parent
e2dcf3cc54
commit
6e64aba47f
@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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>
|
Loading…
Reference in New Issue
Block a user