Changeset abc0f4c


Ignore:
Timestamp:
Oct 17, 2015 5:38:57 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f713a19
Parents:
71bc55b
Message:

lint core, console, i2ptunnel, jetty

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/jsp/editClient.jsp

    r71bc55b rabc0f4c  
    5757                } %>
    5858                <input type="hidden" name="tunnel" value="<%=curTunnel%>" />
    59                 <input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
     59                <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" />
    6060                <input type="hidden" name="type" value="<%=tunnelType%>" />
    6161                <%
  • apps/i2ptunnel/jsp/editServer.jsp

    r71bc55b rabc0f4c  
    5757                } %>
    5858                <input type="hidden" name="tunnel" value="<%=curTunnel%>" />
    59                 <input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
     59                <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" />
    6060                <input type="hidden" name="type" value="<%=tunnelType%>" />
    6161                <%
  • apps/i2ptunnel/jsp/index.jsp

    r71bc55b rabc0f4c  
    6161
    6262  if (indexBean.isInitialized()) {
     63      String nextNonce = net.i2p.i2ptunnel.web.IndexBean.getNextNonce();
    6364
    6465%>
     
    6869            <div class="toolbox">
    6970                <a class="control" href="wizard"><%=intl._t("Tunnel Wizard")%></a>
    70                 <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Stop%20all"><%=intl._t("Stop All")%></a>
    71                 <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Start%20all"><%=intl._t("Start All")%></a>
    72                 <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Restart%20all"><%=intl._t("Restart All")%></a>
     71                <a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Stop%20all"><%=intl._t("Stop All")%></a>
     72                <a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Start%20all"><%=intl._t("Start All")%></a>
     73                <a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Restart%20all"><%=intl._t("Restart All")%></a>
    7374<%--
    7475                //this is really bad because it stops and restarts all tunnels, which is probably not what you want
    75                 <a class="control" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=Reload%20configuration"><%=intl._t("Reload Config")%></a>
     76                <a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Reload%20configuration"><%=intl._t("Reload Config")%></a>
    7677--%>
    7778            </div>
     
    153154                case IndexBean.STARTING:
    154155          %><div class="statusStarting text"><%=intl._t("Starting...")%></div>   
    155             <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
     156            <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
    156157        <%
    157158                break;
    158159                case IndexBean.RUNNING:
    159160          %><div class="statusRunning text"><%=intl._t("Running")%></div>   
    160             <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
     161            <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
    161162        <%
    162163                break;
    163164                case IndexBean.NOT_RUNNING:
    164165          %><div class="statusNotRunning text"><%=intl._t("Stopped")%></div>   
    165             <a class="control" title="Start this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=start&amp;tunnel=<%=curServer%>"><%=intl._t("Start")%></a>
     166            <a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curServer%>"><%=intl._t("Start")%></a>
    166167        <%
    167168                break;
     
    276277                case IndexBean.STARTING:
    277278          %><div class="statusStarting text"><%=intl._t("Starting...")%></div>
    278             <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
     279            <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
    279280        <%
    280281                break;
    281282                case IndexBean.STANDBY:
    282283          %><div class="statusStarting text"><%=intl._t("Standby")%></div>
    283             <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
     284            <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
    284285        <%
    285286                break;
    286287                case IndexBean.RUNNING:
    287288          %><div class="statusRunning text"><%=intl._t("Running")%></div>
    288             <a class="control" title="Stop this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
     289            <a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
    289290        <%
    290291                break;
    291292                case IndexBean.NOT_RUNNING:
    292293          %><div class="statusNotRunning text"><%=intl._t("Stopped")%></div>
    293             <a class="control" title="Start this Tunnel" href="list?nonce=<%=indexBean.getNextNonce()%>&amp;action=start&amp;tunnel=<%=curClient%>"><%=intl._t("Start")%></a>
     294            <a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curClient%>"><%=intl._t("Start")%></a>
    294295        <%
    295296                break;
  • apps/i2ptunnel/jsp/wizard.jsp

    r71bc55b rabc0f4c  
    9393                <input type="hidden" name="page" value="<%=curPage%>" />
    9494                <input type="hidden" name="tunnel" value="null" />
    95                 <input type="hidden" name="nonce" value="<%=editBean.getNextNonce()%>" />
     95                <input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" />
    9696            </div>
    9797
  • apps/jetty/java/src/net/i2p/servlet/filters/XSSRequestWrapper.java

    r71bc55b rabc0f4c  
    8585     */
    8686    @Override
    87     @SuppressWarnings({"unchecked", "rawtypes"})
    88     public Map getParameterMap() {
    89         Map rv = new HashMap();
    90         for (Enumeration keys = getParameterNames(); keys.hasMoreElements(); ) {
    91              String k = (String) keys.nextElement();
     87    public Map<String, String[]> getParameterMap() {
     88        Map<String, String[]> rv = new HashMap<String, String[]>();
     89        for (Enumeration<String> keys = getParameterNames(); keys.hasMoreElements(); ) {
     90             String k = keys.nextElement();
    9291             String[] v = getParameterValues(k);
    9392             if (v != null)
  • apps/routerconsole/jsp/configui.jsp

    r71bc55b rabc0f4c  
    3232<div class="configure"><div class="topshimten"><h3><%=uihelper._t("Router Console Theme")%></h3></div>
    3333 <form action="" method="POST">
    34  <input type="hidden" name="consoleNonce" value="<%=intl.getNonce()%>" >
     34 <input type="hidden" name="consoleNonce" value="<%=net.i2p.router.web.CSSHelper.getNonce()%>" >
    3535 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    3636 <input type="hidden" name="action" value="blah" >
  • apps/routerconsole/jsp/console.jsp

    r71bc55b rabc0f4c  
    1111</head><body onload="initAjax()">
    1212<%
    13     String consoleNonce = intl.getNonce();
     13    String consoleNonce = net.i2p.router.web.CSSHelper.getNonce();
    1414%>
    1515
  • apps/routerconsole/jsp/css.jsi

    r71bc55b rabc0f4c  
    3838
    3939   String conNonceParam = request.getParameter("consoleNonce");
    40    if (intl.getNonce().equals(conNonceParam)) {
     40   if (net.i2p.router.web.CSSHelper.getNonce().equals(conNonceParam)) {
    4141       intl.setLang(request.getParameter("lang"));
    4242       intl.setNews(request.getParameter("news"));
  • apps/routerconsole/jsp/home.jsp

    r71bc55b rabc0f4c  
    99</head><body onload="initAjax()">
    1010<%
    11     String consoleNonce = intl.getNonce();
     11    String consoleNonce = net.i2p.router.web.CSSHelper.getNonce();
    1212%>
    1313<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
  • apps/routerconsole/jsp/summaryframe.jsp

    r71bc55b rabc0f4c  
    2424        if (d == null || "".equals(d)) {
    2525            // set below
    26         } else if (intl.getNonce().equals(conNonceParam)) {
     26        } else if (net.i2p.router.web.CSSHelper.getNonce().equals(conNonceParam)) {
    2727            d = net.i2p.data.DataHelper.stripHTML(d);  // XSS
    2828            intl.setRefresh(d);
  • core/java/src/net/i2p/kademlia/KBucketSet.java

    r71bc55b rabc0f4c  
    629629     *              Can be 1 bigger if top byte is zero
    630630     */
     631    @SuppressWarnings("unchecked")
    631632    private T makeKey(byte[] data) {
    632633        int len = _us.length();
Note: See TracChangeset for help on using the changeset viewer.