Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

压缩包内部包含特殊字符导致预览失败 #566

Open
Ariesly opened this issue Jun 26, 2024 · 0 comments · May be fixed by #567
Open

压缩包内部包含特殊字符导致预览失败 #566

Ariesly opened this issue Jun 26, 2024 · 0 comments · May be fixed by #567

Comments

@Ariesly
Copy link

Ariesly commented Jun 26, 2024

环境: Windows
版本: kkFileView-4.4.0-beta

错误日志:

cn.keking.service.CompressFileReader     : Error processing RAR file: Error processing RAR file: Illegal char <?> at index 0: ??.pdf

java.lang.Exception: Error processing RAR file: Illegal char <?> at index 0: ??.pdf
	at cn.keking.service.CompressFileReader.unRar(CompressFileReader.java:83) ~[classes!/:na]
	at cn.keking.service.impl.CompressFilePreviewImpl.filePreviewHandle(CompressFilePreviewImpl.java:55) ~[classes!/:na]
	at cn.keking.web.controller.OnlinePreviewController.onlinePreview(OnlinePreviewController.java:84) [classes!/:na]
	at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_261]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_261]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) [spring-web-5.3.3.jar!/:5.3.3]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) [spring-web-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:497) [jakarta.servlet-api-4.0.4.jar!/:4.0.4]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.3.jar!/:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) [jakarta.servlet-api-4.0.4.jar!/:4.0.4]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228) [websocket-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113) [spring-web-5.3.3.jar!/:5.3.3]
	at cn.keking.web.filter.SecurityFilterProxy.doFilterInternal(SecurityFilterProxy.java:28) [classes!/:na]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar!/:5.3.3]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.AttributeSetFilter.doFilter(AttributeSetFilter.java:26) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.TrustDirFilter.doFilter(TrustDirFilter.java:49) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.TrustHostFilter.doFilter(TrustHostFilter.java:49) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.UrlCheckFilter.doFilter(UrlCheckFilter.java:49) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.BaseUrlFilter.doFilter(BaseUrlFilter.java:61) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at cn.keking.web.filter.ChinesePathFilter.doFilter(ChinesePathFilter.java:21) [classes!/:na]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.3.jar!/:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar!/:5.3.3]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.3.jar!/:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar!/:5.3.3]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.3.jar!/:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar!/:5.3.3]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) [jetty-security-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) [jetty-servlet-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) [jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) ~[jetty-server-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-io-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[jetty-io-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[jetty-io-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905) ~[jetty-util-9.4.35.v20201120.jar!/:9.4.35.v20201120]
	at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_261]
Caused by: java.nio.file.InvalidPathException: Illegal char <?> at index 0: ??.pdf
	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source) ~[na:1.8.0_261]
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source) ~[na:1.8.0_261]
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source) ~[na:1.8.0_261]
	at sun.nio.fs.WindowsPath.parse(Unknown Source) ~[na:1.8.0_261]
	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) ~[na:1.8.0_261]
	at sun.nio.fs.AbstractPath.resolve(Unknown Source) ~[na:1.8.0_261]
	at cn.keking.service.CompressFileReader.getFilePathInsideArchive(CompressFileReader.java:95) ~[classes!/:na]
	at cn.keking.service.CompressFileReader.unRar(CompressFileReader.java:61) ~[classes!/:na]
	... 89 common frames omitted

示例文件:
测试.zip

已知非法字符: ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant