On 17/02/2025 11:50, Michael Osipov wrote:
Folks,

consider the following usecase:
<Resources>
                <PostResources base="/foo/prod"
                                
className="org.apache.catalina.webresources.DirResourceSet"
                                webAppMount="/dav" readOnly="true" 
allowLinking="true" />
...
</Resources>

This, of course does not work. I have to move the allowLinking attribute up to 
Resources which means that all resources are allowed to do that. I'd rather 
prefer something like:
<Directory /foo/prod>
   Options FollowSymLinks
</Directory>

Looking at the current code getRoot().getAllowLinking() is invoked, for obvious 
reasons. I am a bit reluctant to allow that globally unless absolutely 
necessary.
I think it would be worthwile to add to AbstractFileResourceSet which would 
first probe on the set and then consult the root.

WDYT? Shall I file an enhancement request?

Seems reasonable.

I think how to handle this for Pre/Post Resources and the main resources is worth a little more thought.

Clearly, we want to be able to enable this for Pre/Post Resources without enabling it for the main resources since that is that whole point of the argument you make above.

What about the inverse?

If this is enabled for the main resources should it automatically be enabled for Pre/Post Resources? That is effectively what happens as the moment but do we want to change that? (If we do, likely only for 12.0.x onwards).

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to