Opened 5 years ago

Closed 4 years ago

#1524 closed enhancement (fixed)

Validate I2PControl Paramaters

Reported by: lazygravy Owned by: tuna
Priority: minor Milestone: soon
Component: apps/plugins Version: 0.9.19
Keywords: I2PControl Cc: tuna
Parent Tickets: Sensitive: no

Description

When submitting parameters to update the router, types do not seem to be checked. To text this, submit a request to change router's share percent to ' ' (space). It will set fine. This might happen to other parameters too, I have not tested yet.

Subtickets

Change History (4)

comment:1 Changed 5 years ago by lazygravy

Additionally, the router should handle bad values being set without crashing. Logs:

2015/04/13 15:05:20 | <-- Wrapper Stopped
2015/04/13 15:05:42 | --> Wrapper Started as Daemon
2015/04/13 15:05:42 | Java Service Wrapper Community Edition 64-bit 3.5.25
2015/04/13 15:05:42 |   Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
2015/04/13 15:05:42 |     http://wrapper.tanukisoftware.com
2015/04/13 15:05:42 | 
2015/04/13 15:05:42 | Launching a JVM...
2015/04/13 15:05:42 | WrapperManager: Initializing...
2015/04/13 15:05:42 | Starting I2P 0.9.19-0-1~deb7u+1
2015/04/13 15:05:42 | INFO: Native CPUID library jcpuid-x86-linux loaded from file
2015/04/13 15:05:42 | INFO: Locally optimized native BigInteger library loaded from file
2015/04/13 15:05:43 | WrapperSimpleApp: 
2015/04/13 15:05:43 | WrapperSimpleApp Error: Encountered an error running main:
2015/04/13 15:05:43 | WrapperSimpleApp Error: java.lang.NullPointerException
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.Router.getSharePercentage(Router.java:1772)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.tunnel.TunnelDispatcher.getShareBandwidth(TunnelDispatcher.java:915)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.tunnel.pool.BuildHandler.<init>(BuildHandler.java:105)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.tunnel.pool.TunnelPoolManager.<init>(TunnelPoolManager.java:72)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.RouterContext.initAll(RouterContext.java:208)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.Router.startupStuff(Router.java:376)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.Router.runRouter(Router.java:558)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at net.i2p.router.Router.main(Router.java:1500)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at java.lang.reflect.Method.invoke(Method.java:606)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:290)
2015/04/13 15:05:43 | WrapperSimpleApp Error:   at java.lang.Thread.run(Thread.java:745)
2015/04/13 15:05:45 | <-- Wrapper Stopped

comment:2 Changed 5 years ago by zzz

I will fix the issue in comment 1.

comment:3 Changed 5 years ago by zzz

Owner: set to tuna
Status: newassigned

NPE fixed in 82f5deb4bce8a287479362c7d8be45bbfa0a0921 0.9.19-1

Assigning to tuna for i2pcontrol side

comment:4 Changed 4 years ago by tuna

Resolution: fixed
Status: assignedclosed

Fixed in 0.11

Note: See TracTickets for help on using tickets.