Skip to content

Commit 0c0ba39

Browse files
committed
Update phar_object.c
1 parent 07ad519 commit 0c0ba39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/phar/phar_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ static void phar_add_file(phar_archive_data **pphar, zend_string *file_name, con
35653565
) {
35663566
size_t prefix_len = (ZSTR_VAL(file_name)[0] == '/') + sizeof(".phar")-1;
35673567
char next_char = ZSTR_VAL(file_name)[prefix_len];
3568-
if (IS_SLASH(next_char) || next_char == '\0') {
3568+
if (next_char == '/' || next_char == '\\' || next_char == '\0') {
35693569
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot create any files in magic \".phar\" directory");
35703570
return;
35713571
}

0 commit comments

Comments
 (0)