#2167 closed defect (fixed)

Browsing /i2psnark/.ajax/ causes null pointer exception

Reported by: Reportage Owned by: zzz
Priority: minor Milestone: 0.9.34
Component: apps/i2psnark Version: 0.9.33
Keywords: i2psnark, ajax, null pointer Cc:
Parent Tickets: #2155 Sensitive: no

Description

This looks like it should 404/403.

HTTP ERROR 500

Problem accessing /i2psnark/.ajax/. Reason:

    Server Error

Caused by:

java.lang.NullPointerException
	at org.klomp.snark.SnarkManager.getConfig(SnarkManager.java:680)
	at org.klomp.snark.SnarkManager.getSavedCommentsEnabled(SnarkManager.java:2038)
	at org.klomp.snark.web.I2PSnarkServlet.getListHTML(I2PSnarkServlet.java:3184)
	at org.klomp.snark.web.I2PSnarkServlet.doGetAndPost(I2PSnarkServlet.java:238)
	at org.klomp.snark.web.I2PSnarkServlet.doGet(I2PSnarkServlet.java:152)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at net.i2p.servlet.filters.XSSFilter.doFilter(XSSFilter.java:30)
	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.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at net.i2p.router.web.HostCheckHandler.handle(HostCheckHandler.java:78)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
	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:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	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:748)

Subtickets

Change History (2)

comment:1 Changed 20 months ago by zzz

Milestone: undecided0.9.34
Parent Tickets: 2155
Status: newaccepted

As it does for any not found page with a trailing slash, e.g. /i2psnark/foo/

Within a valid torrent. /i2psnark/validtorrent/foo/ returns a nice error page but /i2psnark/validtorrent/foo returns a Jetty 404.

Related to / part of #2155
Not sure about all of #2155 but the NPE should be fixed for 0.9.34

comment:2 Changed 20 months ago by zzz

Resolution: fixed
Status: acceptedclosed

Used to work, broken when we added comment support, was NPE in the comment code.
In 0d23f6082bfa2f74fe4b83b1eb138b7e651e6f9b to be 0.9.33-6

Note: See TracTickets for help on using tickets.