Commit Graph

49 Commits

Author SHA1 Message Date
zzz
1752291ffd Console: Fix disabling sidebar refresh
0 disables refresh on /configsidebar
disable ajax if refresh disabled
change refresh default to 15 sec
2020-04-07 20:47:12 +00:00
zzz
ab7f61d220 Console: Drop midnight and classic themes (ticket #2272) 2019-02-18 18:14:28 +00:00
zzz
57ddc8ea4f conversion cleanup 2018-08-25 14:29:32 +00:00
zzz
63f0355680 Console: Prep for removing themes (ticket #2272) 2018-07-28 13:47:08 +00:00
zzz
9b2a85df38 Console: Split net.i2p.router.web into two packages, and move the new .helper package to the war 2017-12-01 14:07:29 +00:00
zzz
ed39ea408f Utils: Consolidate user-agent detection code in a new utility class
Add some new checks for mobile
2017-11-16 12:58:59 +00:00
zzz
2b8f14f709 Minor fixes and javadocs after review
Set 90 day default for event log
Format clock skew in summary bar
Constant time for password hash check
2017-11-06 23:45:57 +00:00
47d354711e /configui: Add option to embed Susimail and I2PSnark in console 2017-10-25 09:33:20 +00:00
zzz
51c5da3f72 lint: don't catch Exception, catch RuntimeException or checked exception.
omits SAM, BOB, reflection, commented-out code, and a few other places
2015-11-12 18:49:13 +00:00
22b9876b68 Rename _() for translation to _t() for Java 9 compatibility (ticket #1456) 2015-09-25 19:55:36 +00:00
zzz
7e4832d5f2 lint 2015-03-16 15:44:45 +00:00
zzz
b28eb708a4 * Console:
- Fix update buttons
   - Don't filter parameter names starting with "nofilter_"
   - Re-allow configadvanced, news URL, and unsigned update URL if routerconsole.advanced=true
   - Re-allow plugin install if routerconsole.advanced=true or routerconsole.enablePluginInstall=true
   - Only allow whitelisted plugin signers, unless routerconsole.allowUntrustedPlugins=true
   - Re-allow clients.config changes if routerconsole.advanced=true or routerconsole.enableClientChange=true
   - More escaping
 * i2psnark: Fix add torrent form
2014-08-03 13:58:51 +00:00
zzz
af575d6c95 * Console:
- Fix several XSS issues (thx Aaron Portnoy of Exodus Intel)
  - Add Content-Security-Policy and X-XSS-Protection headers
  - Disable changing news feed URL from UI
  - Disable plugin install from UI
  - Disable setting unsigned update URL from UI
  - Disable /configadvanced
* DataHelper: Disallow \r in storeProps() (thx joernchen of Phenoelit)
* ExecNamingService: Disable (thx joernchen of Phenoelit)
* Startup: Add susimail.config to migrated files
2014-07-26 09:32:26 +00:00
zzz
af5c0bd8a7 Console, i2psnark, susimail: Recognize emacs-w3m as a text-mode browser
As reported at http://zzz.i2p/topics/1630
untested
2014-05-28 21:25:35 +00:00
zzz
c57552f4e9 * Console: Handle ISO-639-2 language codes (ticket #1229) 2014-03-12 12:29:38 +00:00
zzz
9e4d5c0e61 propagate from branch 'i2p.i2p' (head da40262a8b7685de3877c1d7d6d16a155caa9e7c)
to branch 'i2p.i2p.zzz.test2' (head 6263bb149b8301059d0471bcc1d47caeca660f4e)
2013-11-22 17:29:45 +00:00
2f4765665d routerconsole: type arguments, unused imports 2013-11-21 11:31:50 +00:00
zzz
dbe0a8240e Translations:
- Add support for country variants (ticket #1133)
  - Refactor data in ConfigUIHelper
Config files: Allow empty values
2013-11-18 23:18:46 +00:00
535c782b7c Allow normal themes to be used with IE >= 10 2013-05-30 01:39:07 +00:00
bb0d2ef17c Added User Agent string for Opera Mobile
On tablets the UA is "Opera Tablet" so tablets will use the desktop console.
2013-01-21 06:01:42 +00:00
d5a870226c Added option to /configui to force the mobile console to be used 2013-01-21 05:59:53 +00:00
7d38041d23 Tweak so Android tablets use the normal routerconsole 2013-01-19 03:46:38 +00:00
zzz
d5c70676b0 * Console:
- Fix NPE after restart (ticket #763)
   - Move more nonces out of system properties
2012-11-05 17:17:31 +00:00
zzz
20279d1597 propagate from branch 'i2p.i2p' (head 52d5a19210a344e0de43f6fe4d898d34f6c41829)
to branch 'i2p.i2p.zzz.update' (head d88c6abf9b4988ba892e435594cd74917ab9ab7f)
2012-09-25 15:04:49 +00:00
31ea4a7093 Changed universal theming prop key (so not mistaken as a theme name by routerconsole) 2012-08-07 04:29:50 +00:00
zzz
4a1b83961d propagate from branch 'i2p.i2p' (head d2198c4bc21a9d06194cdb2dce24945ebc9d1542)
to branch 'i2p.i2p.zzz.update' (head 88ac67dc4e166b7e9dec0d3224e58bec4894440d)
2012-08-03 18:30:39 +00:00
a623d924fa Reverted routerconsole to storing theme itself, also store universal theming boolean 2012-08-01 01:50:59 +00:00
5d5a3b80e5 Store router console theme setting in themes.config 2012-07-21 10:11:32 +00:00
75046d11fb Separated disabling of iframe refresh from the refresh time 2012-07-09 00:39:52 +00:00
zzz
e62b76d2cc Big refactor of the router console update subsystem, in preparation for
implementing out-of-console updaters like i2psnark.

- Add new update interfaces in net.i2p.update
- All update implementations moved to routerconsole update/
- Implement an UpdateManager that registers with the RouterContext
- UpdateManager handles multiple types of things to update
  (router, plugins, news, ...) and methods of updating (HTTP, ...)
- UpdateManager maintains list of installed, downloaded, and available versions of everything
- Define Updaters that can check for a new version and/or download an item
- Individual Updaters register with the UpdateManager obtained from
  I2PAppContext, identifying the type of update item and
  update method they can handle.
- Updaters need only core libs, no router.jar or routerconsole access required.
- All checks and updates are initiated via the UpdateManager.
- All status on checks and updates in-progress or completed are
  obtained from the UpdateManager. No more use of System properties
  to broadcast update state.
- All update and checker tasks are intantiated on demand and threaded;
  no more static references left over.
- Split out the Runners and Checkers from the Handlers and make the inheritance more sane.
- No more permanent NewsFetcher thread; run on the SimpleScheduler queue
  and thread a checker task only to fetch the news.
- No more static NewsFetcher instance in routerconsole.
  All helper methods that are still required are moved to NewsHelper.

The UpdateManager implements the policy for when to check and download.
All requests go through the UpdateManager.

For each update type, there's several parts:
    - The xxxUpdateHandler implements the Updater
    - The xxxUpdateChecker implements the UpdateTask for checking
    - The xxxUpdateRunner implements the UpdateTask for downloading

New and moved classes:

web/				update/
----				-------
new				ConsoleUpdateManager.java

new				PluginUpdateChecker.java from PluginUpdateChecker
PluginUpdateChecker 		-> PluginUpdateHandler.java
PluginUpdateHandler.java	-> PluginUpdateRunner

new				UnsignedUpdateHandler.java
UnsignedUpdateHandler		->  UnsignedUpdateRunner.java
new				UnsignedUpdateChecker from NewsFetcher

UpdateHandler.java remains
new				UpdateHandler.java
new				UpdateRunner.java from UpdateHandler

move				NewsHandler from NewsFetcher
new				NewsFetcher
new				NewsTimerTask

new				DummyHandler


Initial checkin. Unfinished, untested, unpolished.
2012-06-18 22:09:45 +00:00
fa3e3e0764 Enforcing minimum refresh rate better, and reducing it to 3 seconds
This does mean that the iframe don't-refresh state (= refresh rate of 0 seconds)
doesn't hold if the page is changed (in fact, the refresh rate becomes the
minimum) - so maybe better to have a different config var for that?
2012-06-11 23:33:33 +00:00
84344b6789 Added a config page for summary bar 2012-06-07 02:51:22 +00:00
zzz
3685bf04d0 add X-Frame-Options to console headers 2012-05-13 13:05:17 +00:00
zzz
95329803a9 - Use new synchronized change-and-save-config methods
to eliminate races with ReadConfigJob
2012-01-18 01:54:34 +00:00
zzz
37e3e9e2cf * Console: Add ability to hide news 2011-11-09 18:38:39 +00:00
zzz
b2263efaf0 cache user-agent processing 2011-09-02 17:24:14 +00:00
zzz
428db02274 * Console: Hide iframe on mobile browsers
* DataHelper: Speed up eq() (Ticket #437)
    * HTTPServer: Strip inbound X-Accept-Encoding header
    * netdb.jsp: HTML fixes
    * Plugins: Log error when console server not found
    * Reseed: Log tweak
2011-04-10 18:22:43 +00:00
zzz
34d951aa6b recognize links as a text browser 2011-03-19 16:40:10 +00:00
zzz
b02fe536bc * Console:
- Parameterize download button tags (ticket #425)
      - Clean up summary bar HTML warnings
      - Just display a summary bar link for text browsers
      - Move welcome div from the readme files to index.jsp
      - Require a nonce to change language
2011-03-08 03:07:02 +00:00
zzz
21f14ac22e * Console:
- Fix numerous readme HTML errors
      - Fix flag locations in readmes
      - desktopgui.enable now defaults to false; run systray if false
      - Start icon app before console
      - Restore systray form in configservice.jsp
      - Only save lang when clicking on flags if desktopgui is running
      - Only allow two-letter lang code from cgi parameter
2011-02-27 13:53:39 +00:00
110f01a55b I2P logo in routerconsole sidebar is now themed. 2010-06-27 17:04:51 +00:00
zzz
f3576e54c6 throw IllegalStateException rather than NPE if no context 2010-05-05 18:44:12 +00:00
zzz
2d5decd943 save refresh setting 2010-01-02 02:43:18 +00:00
zzz
0c74e640df * Console:
- Don't hide link to configui.jsp for IE any more
      - Add lang selection on configui.jsp
      - Tag strings in configui.jsp
      - Load console_big.css if lang == zh
      - Add _x() tag for static iniitializers
      - HTML transitional input tags
2009-10-22 22:25:53 +00:00
zzz
45a59f009b add a common method for title formatting and translation 2009-10-20 12:12:26 +00:00
zzz
4497463778 * Router Console translation infrastructure:
- Persistent lang setting with routerconsole.lang=xx
      - Loading any page with ?lang=xx changes the persistent setting
      - Add a custom Jetty handler to load foo_xx.jsp if it
        exists for language xx. This is for jsp files with lots
        of text in them. Otherwise use inline translate methods.
        Not for included jsps.
      - Add a script to create and update messages_xx.po translation
        files, and create ResourceBundles from them
      - Add class to translate strings from cached ResourceBundles
      - Add translate wrappers to HelperBase, FormHandler, and *Renderer,
        so calls can be made from both jsp and java files
      - Add two example translations on configupdate.jsp - one in
        the jsp itself and one in the helper.
      - This is for strings in routerconsole only. Will be expanded
        to other webapps and the router later.
2009-10-18 14:06:07 +00:00
zzz
53a68ff5a3 Make light the default theme 2009-07-15 22:56:53 +00:00
zzz
0f1a4ad4cd * Console: Force IE to the classic theme 2009-07-10 13:38:09 +00:00
zzz
d9cb4e2620 * Console:
- Move the console css from default.css in the .war to docs/themes/console/console.css,
        and support console themes in the main console with routerconsole.theme=foo
2009-06-11 18:05:05 +00:00