You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/08/25 16:08:41 UTC
DO NOT REPLY [Bug 51722] New: A broken symlink breaks the Redirect
directive
https://issues.apache.org/bugzilla/show_bug.cgi?id=51722
Bug #: 51722
Summary: A broken symlink breaks the Redirect directive
Product: Apache httpd-2
Version: 2.2.17
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_alias
AssignedTo: bugs@httpd.apache.org
ReportedBy: dawan@melix.net
Classification: Unclassified
If my config contains "Redirect /images/ http://somewhere.else/images/", the
URI http://here/images/ is redirected as it should.
Creating a file, a folder or a symlink pointing to any existing file, giving it
the name "images" and placing it in the DocumentRoot has no effect, this actual
"image" is ignored.
But if "images" is a broken symlink, the redirection will fail and the log will
show "[error] Symbolic link not allowed or link target not accessible:
/.../images".
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 51722] A broken symlink breaks the Redirect
directive
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51722
Nick Kew <ni...@webthing.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |WONTFIX
--- Comment #3 from Nick Kew <ni...@webthing.com> 2011-08-25 16:25:43 UTC ---
If it's in a <Directory> then by definition it can't be applied until after the
directory walk, which includes checking symlinks.
Arguably it's a bug that Redirect is allowed in <Directory> in the first place
as it doesn't make logical sense, but changing that would be too disruptive to
existing configs.
Work around it either by keeping the redirect outside the <Directory> or by
dumping the offending symlink.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 51722] A broken symlink breaks the Redirect
directive
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51722
--- Comment #2 from dawan@melix.net 2011-08-25 15:41:18 UTC ---
Pretty much this :
**
<VirtualHost *:80>
ServerName here
DocumentRoot /blah
</VirtualHost>
<Directory /blah>
Redirect /images/ http://somewhere.else/images/
</Directory>
**
If I add "Options -FollowSymLinks" in the <Directory/>, the redirection will
fail with the error message no matter what "images" is pointing to.
If symlinks are allowed it only fails when it is broken, even a link towards an
unauthorised file won't be a problem (though in this case mod_mime_magic
complains it "can't read /.../file").
I understand how the order can be important in some cases, but I don't get why
apache even tries to access the real "images" in the first place.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 51722] A broken symlink breaks the Redirect
directive
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51722
Nick Kew <ni...@webthing.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Kew <ni...@webthing.com> 2011-08-25 15:12:50 UTC ---
That should depend on merge order. What is the context of your Redirect?
Top level? In a <Location>? A <Directory> ? or ... ?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org