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

special chars in folders name #999

Closed
saiballo opened this issue Jan 11, 2016 · 3 comments
Closed

special chars in folders name #999

saiballo opened this issue Jan 11, 2016 · 3 comments

Comments

@saiballo
Copy link

@saiballo saiballo commented Jan 11, 2016

I have a folder named "[logs]". When I try to open it with gitblit, it returns:

"Internal error"

How can I solve it?

thank you

@RedShift1
Copy link
Contributor

@RedShift1 RedShift1 commented Jan 12, 2016

Confirmed

2016-01-12 11:57:26 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "test2.git" h = "master" f = "[logs]"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "test2.git" h = "master" f = "[logs]"
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
    at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
    at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
    at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:99)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:89)
    at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:92)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
    ... 40 more
Caused by: java.lang.NullPointerException
    at com.gitblit.utils.JGitUtils.getPathModel(JGitUtils.java:1203)
    at com.gitblit.utils.JGitUtils.getFilesInPath2(JGitUtils.java:942)
    at com.gitblit.wicket.pages.TreePage.<init>(TreePage.java:55)
    ... 45 more
2016-01-12 11:57:26 [DEBUG] RESPONSE /tree/test2.git/master/[logs]  500 handled=true

@gitblit
Copy link
Owner

@gitblit gitblit commented Jan 16, 2016

Yup, we need a pull request to solve this. :)

@JR-Carroll
Copy link

@JR-Carroll JR-Carroll commented Dec 25, 2016

Wanted to add to this: I had a similar issue just now where I had the name "(Temp and Humid Sensor) - ATMega32u4" and it appears to throw the same error ("Internal Error") when I try to navigate to the 'tree' view via the web portal. I was able to correct the problem by removing the parens.

Running v1.8.0.

[Cut from my logs]

2016-12-25 07:16:47 [ERROR] Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "~jcarroll/AllArduino.git" h = "master" f = HT11   (Temp & Humid Sensor) - ATMega32u4/Temp_Humid_Sensor_Example"
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.gitblit.wicket.pages.TreePage(org.apache.wicket.PageParameters) and argument r = "~jcarroll/AllArduino.git" h =   aster" f = "DHT11 (Temp & Humid Sensor) - ATMega32u4/Temp_Humid_Sensor_Example"
	at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
	at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279)
	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
	at com.gitblit.servlet.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:99)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
	at com.gitblit.servlet.ProxyFilter$1.doFilter(ProxyFilter.java:89)
	at com.gitblit.servlet.ProxyFilter.doFilter(ProxyFilter.java:92)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:88)
	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
	at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
	... 40 more
Caused by: java.lang.NullPointerException
	at com.gitblit.utils.JGitUtils.getPathModel(JGitUtils.java:1275)
	at com.gitblit.utils.JGitUtils.getFilesInPath2(JGitUtils.java:963)
	at com.gitblit.wicket.pages.TreePage.<init>(TreePage.java:62)
	... 45 more

@flaix flaix added this to the 1.9.0 milestone Jan 18, 2017
flaix added a commit to flaix/gitblit that referenced this issue Jun 10, 2019
Create a regression test for issue gitblit#999.
Add directories with '[]' ans '()' in the name to the
hello-world repository, so that they can be used in unit
tests for repository paths with special characters.
@flaix flaix closed this as completed in 3bff35c Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants