Commit Graph

973 Commits

Author SHA1 Message Date
vsolanki 8408f10eff Download files concurrently 2018-11-21 10:05:20 -05:00
Michael Bayne 3ed6bb2a48 Notes on per-platform installers.
Let's make sure people know what they're getting into right away.
2018-11-20 08:54:53 -08:00
Michael Bayne 93c8014302 Be less cloy. 2018-11-20 08:46:48 -08:00
Michael Bayne e11f2ebd48 Explain the three artifacts in the README.
Also link directly to their Maven sub-directories to avoid confusion with old
versions.
2018-11-20 08:42:37 -08:00
Michael Bayne df2ff3fddb Always use a thread pool of at least size 1.
Fixes #161.
2018-11-19 19:36:13 -08:00
vsolanki 94d7852324 Typo 2018-11-19 10:40:06 -05:00
vsolanki 901b1c03e2 Introduced a new option called sysargs to bootstrap.properties to allow the setting of system properties during the bootstrap setup
Usage: sysargs = [key1]:[val1], [key2]:[val2], [key3]
2018-11-19 09:07:01 -05:00
Michael Bayne 3b888a72b7 Escape special chars in env var replacements. 2018-11-15 08:32:39 -08:00
Michael Bayne 85c578f861 Removed bits about non-Java apps; added JWS caveat.
Closes #157
2018-11-09 14:14:20 -08:00
Michael Bayne 5fd28d9211 Need www on SK link. 2018-11-02 08:36:02 -07:00
Michael Bayne 826e744562 Fix SK link. 2018-11-02 08:32:56 -07:00
Michael Bayne d440e0346c Remove legacy Ant build.
It hasn't worked in years.

Closes #155
2018-11-02 08:30:14 -07:00
Michael Bayne bb6a6c3a64 Refer to main Maven Central directory.
There's no longer a single jar file to talk about, and sending people to the
directory saves us from having to update README every time we do a release.

Fixes #152
2018-10-29 14:51:39 -07:00
Michael Bayne a0c4edfc67 Notes for 1.7.1 and 1.8.0 releases. 2018-10-19 10:17:24 -07:00
Michael Bayne d4884d5388 [maven-release-plugin] prepare for next development iteration 2018-10-19 09:50:39 -07:00
Michael Bayne 9edca56628 [maven-release-plugin] prepare release getdown-1.8.0 2018-10-19 09:50:29 -07:00
Michael Bayne 70e27095db Ignore top-level target directory.
That is created during the release process.
2018-10-19 09:49:15 -07:00
Michael Bayne 0efc039a17 Fix Javadoc error. 2018-10-19 09:48:43 -07:00
Michael Bayne 2bc0fc970e Add notes on upcoming 1.8.0 release. 2018-10-19 09:44:40 -07:00
Michael Bayne 0f5622df72 Allow thread pool to be sized with -Dthread_pool_size.
Also use num processors minus one instead of num processors.
2018-10-03 08:47:44 -07:00
Michael Bayne 5499969b2c Fix bug in argv apparg parsing. 2018-09-25 09:12:28 -07:00
Michael Bayne 883954c3e5 Consolidate & enhance "environment config" handling.
The new code is more careful about how it obtains config info, and issues
warnings when sources of info conflict. It does not abort in such circumstances
as Getdown's prime directive is to do the best it can to get the app updated
and launched. But the warnings will hopefully allow accidental conflicts to be
detected and avoided before being deployed to customers.

We also now allow bootstrap.properties to provide an appid; that matches what
was possible via system properties and command line arguments. We also avoid
"communicating" environment configuration through the Java system properties
mechanism. We now read from sysprops but do not write back to them.

Lastly, this includes some name tidying (like appdir -> appDir and
getAppdir -> getAppDir).
2018-09-17 13:44:14 -07:00
Michael Bayne ed22142488 Merge pull request #140 from vgropp/bootstrap.properties
load bootstrap.properties from getdown-launcher.jar
2018-09-17 10:44:46 -07:00
gropp_volker 38427cbc1e load bootstrap.properties from resource bundle 2018-09-17 17:36:14 +02:00
Michael Bayne 2bd10cf8a1 Use logging system in code run "inside" Getdown.
Command line tools may still use stdout/stderr directly.
2018-09-14 15:01:31 -07:00
Michael Bayne 935f77e3e8 Merge pull request #135 from sdgx/dos-start-delay
Small DoS mitigation: add start delay sanity check
2018-09-14 14:49:53 -07:00
Michael Bayne 2f0eae9753 Excise additional samskivert code. 2018-09-14 14:48:58 -07:00
Michael Bayne 24a23637a7 Avoid samskivert StringUtil import.
I thought I excised all of these except the Swing stuff, but apparently not.
I will finish that job.
2018-09-14 14:38:22 -07:00
Michael Bayne 0548befe2b Replace singleton with static methods.
Apologies for messing with code after the fact, but some OOPisms are just too
much for me to stomach. This should just be a function of two arguments. No
objects required.

Yes, we're now reparsing the whitelist on every call, but this function is
called only a handful of times.
2018-09-14 14:36:23 -07:00
Michael Bayne 64ce5c2e1c Merge pull request #136 from sdgx/patch-notes-url-command-injection
Avoid possible command injection (patch notes URL)
2018-09-14 14:35:45 -07:00
Michael Bayne 694457da53 Merge pull request #137 from sdgx/remove-legacy-main
Remove legacy Getdown.main( ) method
2018-09-14 14:34:41 -07:00
Michael Bayne 655da01d56 Merge pull request #138 from sdgx/url-whitelist-2
Implement URL host whitelist
2018-09-14 14:19:23 -07:00
Michael Bayne d6e1dba2c9 Plug Application constructor hole differently.
I can imagine scenarios where someone might legitimately want to extend
Application, so I'd rather not close off that avenue completely.
2018-09-14 14:14:09 -07:00
Michael Bayne a1894107af Merge pull request #139 from sdgx/ctor-invokes-overridable-function
Avoid calling overridable function from constructor
2018-09-14 14:12:55 -07:00
Daniel Gredler f49bc7daf5 Update dependencies and enable Mockito extension so that we can mock final classes 2018-09-13 16:43:53 -04:00
Daniel Gredler fdd767086a Avoid calling overridable function from constructor
When a constructor calls an overridable function, it may allow an attacker to access the "this" reference prior to the object being fully initialized, which can in turn lead to a vulnerability.

Application -> getLocalPath
ProxyPanel -> get
AbortPanel -> get
RotatingBackgrounds -> makeEmpty

(Triggered by internal security audit and Fortify analysis.)
2018-09-13 16:20:53 -04:00
Daniel Gredler dac72d1665 Implement URL host whitelist
Allows users to build customized Getdown JARs which can only talk to whitelisted hosts. This can be useful for very security-conscious organizations which want to distribute Getdown internally as a standard application bootstrapping mechanism, but want to ensure that it can only be used for internal applications.

This is an adaptation of the whitelist proof-of-concept discussed on the mailing list, adjusted to use the new Build class.

(Triggered by internal security audit and Fortify analysis.)
2018-09-13 12:18:33 -04:00
Daniel Gredler d9826ff895 Remove legacy Getdown.main( ) method
This method was apparently deprecated 12 years ago, when GetdownApp.main( ) was added. The immediate motivation is to eliminate some of the security noise around this method being a source of untrusted data, but in a more general sense it also probably makes sense to clean it up after not being used for so long.

(Triggered by internal security audit and Fortify analysis.)
2018-09-12 16:43:05 -04:00
Daniel Gredler 70174d2a98 Avoid possible command injection
Because we are running cmd.exe here, it is possible to use a malicious URL to execute arbitrary commands on the shell ( e.g. if url=http://my-patch-notes.com/" & del C:\ )

(Triggered by internal security audit and Fortify analysis.)
2018-09-12 16:26:25 -04:00
Michael Bayne 712b06f8fb Generate Build.java file with data from the build.
Currently includes build version and time, but additional build-time static
data can be easily added in the future.
2018-09-10 14:23:11 -07:00
Daniel Gredler a7d847a8e8 Small DoS mitigation: add start delay sanity check
These types of denial of service issues are more common in web applications, but even here an attacker could tie up system resources indefinitely by specifying a very large start delay.

(Triggered by internal security audit and Fortify analysis.)
2018-09-07 13:55:37 -04:00
Michael Bayne b0d2c75cee Name integration test properly. 2018-09-05 16:36:17 -07:00
Michael Bayne 3ab218cf22 Sigh, have to clean before verify due to Proguard blahblah.
Travis insists on running 'mvn install' before running our script. I wish it
wouldn't.
2018-09-05 16:23:03 -07:00
Michael Bayne 7adaa325a8 Run integration tests on Travis. 2018-09-05 16:18:28 -07:00
Michael Bayne 108f87d4c7 Simplify Color & Rectangle handling, fix bug.
We can just keep Color in its ARGB format and have a single static brightness()
helper. Reactangle grew a union method which allows us to avoid AWT's Rectangle
entirely.

stringsToList() needed to return null for null array input, and I went ahead
and used Arrays.asList while I was in there because we know the provenance of
the input array, no one will mutate it.
2018-09-05 16:11:20 -07:00
Michael Bayne f8efdea9ed Oops, committed that a bit too hastily. 2018-09-05 16:11:20 -07:00
Michael Bayne 3c9a023ec6 Provide a Charset to readAllLines. 2018-09-05 15:51:20 -07:00
Michael Bayne cc8ed1cd3a Create simple integration test for digester process.
Much of this lived in the separate testapp, but we can exercise a lot of the
code as an integration test in the main project, so let's do so.
2018-09-05 15:46:42 -07:00
Michael Bayne 4537401d09 Merge pull request #134 from sdgx/unsafe-public-fields
Unsafe public fields in UpdateInterface class: make public fields final
2018-09-05 14:44:22 -07:00
Daniel Gredler 1f2c736564 Unsafe public fields in UpdateInterface class: make public fields final
This commit makes the UpdateInterface class immutable. The Config -> UpdateInterface initialization is moved to the UpdateInterface constructor. Default values for the fields are moved to the constructor as well. Instances of String[] are changed to List<String> and made immutable. Instances of java.awt.Rectangle (which is mutable) are replaced with a new immutable com.threerings.getdown.util.Rectangle class.

Although java.awt.Color is (sort of) immutable, it was also removed and replaced with a new immutable com.threerings.getdown.util.Color class, since it was the last dependency from the getdown core module to anything in the java.awt package, which means that when we migrate to Java 9+ the core module should no longer require a dependency on the java.desktop module.

The assertions and expected values in ColorTest have been verified against the corresponding java.awt.Color values.

(Triggered by internal security audit and Fortify analysis.)
2018-09-05 17:07:58 -04:00