ASF Bugzilla – Attachment 22112 Details for
Bug 45187
Long File name requests gives FORBIDDEN response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Long Filenames Patch
apache-long-filenames.patch (text/plain), 1.14 KB, created by
Roman Garcia
on 2008-06-11 18:51:43 UTC
(
hide
)
Description:
Long Filenames Patch
Filename:
MIME Type:
Creator:
Roman Garcia
Created:
2008-06-11 18:51:43 UTC
Size:
1.14 KB
patch
obsolete
>--- ./server/request.c 2007-07-25 10:13:49.000000000 -0300 >+++ ./server/request.c 2008-06-11 22:22:53.000000000 -0300 >@@ -963,6 +963,10 @@ > "access to %s denied", r->uri); > return r->status = HTTP_FORBIDDEN; > } >+ else if (APR_STATUS_IS_ENAMETOOLONG(rv)) { >+ thisinfo.filetype = APR_NOFILE; >+ break; >+ } > else if ((rv != APR_SUCCESS && rv != APR_INCOMPLETE) > || !(thisinfo.valid & APR_FINFO_TYPE)) { > /* If we hit ENOTDIR, we must have over-optimized, deny >--- ./srclib/apr/file_io/unix/filestat.c 2007-10-17 00:36:49.000000000 -0300 >+++ ./srclib/apr/file_io/unix/filestat.c 2008-06-11 22:26:50.000000000 -0300 >@@ -279,6 +279,14 @@ > struct_stat info; > int srv; > >+ /* Catch fname length == MAX_PATH since GetFileAttributesEx fails >+ * with PATH_NOT_FOUND. We would rather indicate length error than >+ * 'not found' >+ */ >+ if (strlen(fname) >= APR_PATH_MAX) { >+ return APR_ENAMETOOLONG; >+ } >+ > if (wanted & APR_FINFO_LINK) > srv = lstat(fname, &info); > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45187
: 22112 |
36987
|
37165
|
37166