- Fixed bug #42590 (Make the engine recornize \v and \f escape sequences).
(Ilia)
+- Fixed bug #42587 (behaviour change regarding symlinked .php files). (Dmitry)
- Fixed bug #42579 (apache_reset_timeout() does not exist). (Jani)
- Fixed bug #42549 (ext/mysql failed to compile with libmysql 3.23). (Scott)
- Fixed bug #42523 (PHP_SELF duplicates path). (Dmitry)
struct stat st;
char *env_redirect_url = sapi_cgibin_getenv("REDIRECT_URL", sizeof("REDIRECT_URL")-1 TSRMLS_CC);
char *env_document_root = sapi_cgibin_getenv("DOCUMENT_ROOT", sizeof("DOCUMENT_ROOT")-1 TSRMLS_CC);
+ int script_path_translated_len;
/* Hack for buggy IIS that sets incorrect PATH_INFO */
char *env_server_software = sapi_cgibin_getenv("SERVER_SOFTWARE", sizeof("SERVER_SOFTWARE")-1 TSRMLS_CC);
* this fixes url's like /info.php/test
*/
if (script_path_translated &&
- (real_path = tsrm_realpath(script_path_translated, NULL TSRMLS_CC)) == NULL) {
- char *pt = estrdup(script_path_translated);
- int len = strlen(pt);
+ (script_path_translated_len = strlen(script_path_translated)) > 0 &&
+ (script_path_translated[script_path_translated_len-1] == '/' ||
+ (real_path = tsrm_realpath(script_path_translated, NULL TSRMLS_CC)) == NULL)) {
+ char *pt = estrndup(script_path_translated, script_path_translated_len);
+ int len = script_path_translated_len;
char *ptr;
while ((ptr = strrchr(pt, '/')) || (ptr = strrchr(pt, '\\'))) {
SG(request_info).path_translated = estrdup(script_path_translated);
}
} else {
- if (real_path) {
- script_path_translated = real_path;
- }
/* make sure path_info/translated are empty */
if (!orig_script_filename ||
(script_path_translated != orig_script_filename &&
if (script_path_translated && !strstr(script_path_translated, "..")) {
SG(request_info).path_translated = estrdup(script_path_translated);
}
- if (real_path) {
- free(real_path);
- }
+ free(real_path);
}
} else {
#endif