[jboss-jira] [JBoss JIRA] (WFLY-11722) Internal Server Error (500) when using directory-listing in FileHandler

Adam Krajcik (Jira) issues at jboss.org
Thu Feb 14 12:10:00 EST 2019


     [ https://issues.jboss.org/browse/WFLY-11722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Krajcik updated WFLY-11722:
--------------------------------
    Steps to Reproduce: 
# Create a folder in welcome content and create a  bad symlink in the folder
{code}
mkdir folder
cd folder
ln -s xxx bad
{code}
# Start server standalone.sh
# Allow directory listing in file handler
{code}
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=directory-listing, value=true)
reload
{code}
# Go to the folder in welcome content
{code}http://127.0.0.1:8080/folder{code}

  was:
1.) Create a folder in welcome content and create a  bad symlink in the folder
{code}
mkdir folder
cd folder
ln -s xxx bad
{code}
2.) Start server standalone.sh
3.) Allow directory listing in file handler
{code}
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=directory-listing, value=true)
{code}
4.) Go to the folder in welcome content
{code}http://127.0.0.1:8080/folder{code}



> Internal Server Error (500) when using directory-listing in FileHandler
> -----------------------------------------------------------------------
>
>                 Key: WFLY-11722
>                 URL: https://issues.jboss.org/browse/WFLY-11722
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 15.0.1.Final
>            Reporter: Adam Krajcik
>            Assignee: Flavia Rainone
>            Priority: Major
>
> When I added a bad symlink to the *welcome-content* and allowed *directory-listing* in the file handler of the welcome-content.
> However, no exception is thrown when the Internal Server Error (500) is returned on WildFly.
> The following exception is thrown when using _http2_ in  _undertow-examples_:
> {code}
> ava.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/akrajcik/Pictures/pictures
> 	at io.undertow.server.handlers.resource.PathResource.getLastModified(PathResource.java:62)
> 	at io.undertow.server.handlers.resource.DirectoryUtils.renderDirectoryListing(DirectoryUtils.java:139)
> 	at io.undertow.server.handlers.resource.DirectoryUtils.renderDirectoryListing(DirectoryUtils.java:162)
> 	at io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:233)
> 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
> 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> 	at java.lang.Thread.run(Thread.java:811)
> Caused by: java.nio.file.NoSuchFileException: /home/akrajcik/Pictures/pictures
> 	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:98)
> 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:114)
> 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:119)
> 	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:67)
> 	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:156)
> 	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:111)
> 	at java.nio.file.Files.readAttributes(Files.java:1748)
> 	at java.nio.file.Files.getLastModifiedTime(Files.java:2277)
> 	at io.undertow.server.handlers.resource.PathResource.getLastModified(PathResource.java:60)
> 	... 8 more
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list