1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-27 12:46:22 +01:00
Commit Graph

292 Commits

Author SHA1 Message Date
Henry Le Grys
b7be91bc9c Automatically show login dialog when session expires
Previously it just gave an unhelpful error message; now it pops up
the login dialog again. Also, the duplicated accounts bug should be
fixed!
2021-05-24 13:17:11 +01:00
Henry Le Grys
f23d387609 Fix bad logic surrounding download resuming
An oversight in the implementation of partial download resumption led
to cross-contamination in the presence of multiple request URLs, where
an `Accept-Ranges` header from one server would cause a `Range` header
to be supplied to the next. Compounded with a bad ternary expression
in `HttpRequest` which couldn't handle non-200 success codes, this
was causing cryptic "Stream closed" errors on library downloads.
2021-03-31 22:22:00 +01:00
Henry Le Grys
f7bbe82dfb Fix potential NPE with partial redownloads if connection never completes 2021-03-31 19:14:17 +01:00
Henry Le Grys
c3b1e51a51 Fix bad URL decoding & reformatting in HttpRequest 2021-03-28 03:22:44 +01:00
Henry Le Grys
9b1bae32d9 Add some comments to launcher.properties 2021-03-26 19:17:11 +00:00
Henry Le Grys
1219ff5cbc Add donation links to README 2021-03-14 21:53:52 +00:00
Henry Le Grys
831ecfd392 Make gradle clean trigger a clean of all subprojects 2021-03-14 18:36:00 +00:00
Henry Le Grys
cdb32a3fe7 Fix NPE in HttpDownloader if server does not send Accept-Ranges header 2021-03-10 13:17:55 +00:00
Henry Le Grys
cf7e12b4d1 Only append to partially downloaded files if HTTP response is a 206 2021-03-10 01:31:31 +00:00
Henry Le Grys
4552b76465 Fix Updater to only download additional loader files once
Previously the launcher was downloading these files once for every
processor due to code architecture limitations. By moving the download
queueing step into BaseUpdater we ensure they are only downloaded once.
2021-03-10 01:13:27 +00:00
Henry Le Grys
ae6fb109e5 Add support for continuing partial downloads
If the server offers byte-range requests & the request fails, we retry
with a Range header to continue the download where it was interrupted.
2021-03-10 00:01:16 +00:00
Henry Le Grys
4da80dfae0 Throw an error if HTTP file transfers are cleanly closed early
It seems that some HTTP servers can silently close the connection before
the file has finished transferring. Since we count the transferred bytes
anyway, throw an exception if we didn't get the number of bytes the
server previously told us to expect.
2021-03-09 20:14:16 +00:00
Henry Le Grys
8a2b566b18 Make button widths equal in account selection dialog 2021-02-28 02:47:01 +00:00
Henry
3a93e9f39a
Style Account Select dialog (#402) 2021-02-28 02:33:45 +00:00
Henry Le Grys
3fdfb3cf70 Ignore unknown properties when deserializing LatestVersionInfo 2021-02-27 22:57:08 +00:00
johnfriedrich
e2fde95c25
Style Account Select Dialog 2021-02-19 22:58:50 +01:00
Henry Le Grys
daa955fac6 Remove packed check from launcher self-updater 2021-02-19 03:18:24 +00:00
Henry
dd3f4e7290
Add User-Agent to news page HTTP requests (#401) 2021-02-19 03:09:22 +00:00
Henry Le Grys
ef1572fd1b Remove packed check from bootstrapper
Introducing that packed flag was a mistake tbh
2021-02-19 03:07:29 +00:00
David Lohle
4703b0dede Add User-Agent to news page HTTP requests
Cloudflare, and some other MITM proxies consider the default Java HttpURLConnection
from Java 1.8 to be an invalid, unsafe request and reject it. This leads to CF returning a
403 on request. This commit adds the same User-Agent that's applied to the other calls, so
that those that front their SKMC launcher news page with Cloudflare can have successful
page loads.
2021-02-18 21:36:03 -05:00
Henry Le Grys
660fb40c44 Fix weird Lists import from internal jcommander package 2021-02-18 23:30:14 +00:00
Henry Le Grys
5d5a462387 Switch to using Minecraft services as skin provider
We do some local processing to draw the head of the skin in 32px
resolution.
2021-02-18 22:39:51 +00:00
Henry Le Grys
fd78863697 Make skin service return null on error 2021-02-18 21:22:58 +00:00
Henry
4177c15675
Redesign login dialogs & support new Microsoft logins (#398) 2021-02-17 01:15:39 +00:00
Henry Le Grys
c8bc7f68c6 Bump launcher version to 4.5 2021-02-16 22:20:10 +00:00
Henry Le Grys
8eb66d4c67 Clean up error reporting for Minecraft API authentication 2021-02-16 22:16:42 +00:00
Henry Le Grys
ff12d154c8 Convert avatarImage fields to type byte[] 2021-02-16 17:39:54 +00:00
Henry Le Grys
a7dcd2c7fb Prompt Microsoft's OAuth to allow account selection on sign-in
Since signing in via browser should be a rare event (thanks to our
automatic refreshing) it's not so bad that this increases login
friction.
2021-02-16 17:23:25 +00:00
Henry Le Grys
5cf38207ae Fix XSTS error codes being missed due to Jackson weirdness 2021-02-16 17:19:11 +00:00
Henry Le Grys
fec1eaacf4 Fix an NPE due to unfinished getLoginService method 2021-02-16 16:51:45 +00:00
Henry Le Grys
df6415eea4 Show XSTS error messages if non-empty 2021-02-15 21:24:39 +00:00
Henry Le Grys
832dab329a Fix unknown Xbox error formatting 2021-02-15 16:27:31 +00:00
Henry Le Grys
7803242ffa Issue a warning when reformatting URLs fails 2021-02-13 02:58:09 +00:00
Henry Le Grys
b979eb33c9 Set account dialog selection colors correctly 2021-02-13 01:51:53 +00:00
Henry Le Grys
571d1769a2 Remove Pack200 from bootstrapper & default to normal .jar filename 2021-02-12 22:41:04 +00:00
Henry Le Grys
8d3a172ee9 Improve progress messaging during long Microsoft login dance 2021-02-11 18:16:10 +00:00
Henry Le Grys
93c3f04cbb Handle cancelled OAuth requests 2021-02-11 18:01:13 +00:00
Henry Le Grys
1d4e46214b Report Xbox authentication errors 2021-02-11 17:40:59 +00:00
Henry Le Grys
b18c29a5ec Add account selector to creator tools 2021-02-10 01:46:46 +00:00
Henry Le Grys
6b442c771e Improve authentication error messages 2021-02-09 03:06:37 +00:00
Henry Le Grys
b189173b34 Use cached avatar in MicrosoftLoginService 2021-02-09 02:21:56 +00:00
Henry Le Grys
21a108f796 Remove Yggdrasil agent from properties file 2021-02-09 01:44:47 +00:00
Henry Le Grys
2ec8180d2a Add confirmation dialog for forgetting accounts 2021-02-09 01:41:49 +00:00
Henry Le Grys
3effa7d674 Re-add offline session button & alter play button 2021-02-09 01:36:04 +00:00
Henry Le Grys
d2127e9b13 Implement Microsoft OAuth login process 2021-02-09 01:24:55 +00:00
Henry Le Grys
3ddaea55dc Remove old replaced authentication classes 2021-02-08 21:46:33 +00:00
Henry Le Grys
194e977176 Flesh out account selector some more 2021-02-08 21:16:54 +00:00
Henry Le Grys
18a99b338e Fix persistence, download & persist avatar locally 2021-02-08 20:38:49 +00:00
Henry Le Grys
b6252863da Start refactoring auth framework
Featuring:
* New account selection dialog
* Upgrade to Java 8!
* Questionable transitional class names
* Lots of swing code!
2021-02-08 05:48:05 +00:00
Henry Le Grys
25a433ab5b Use explicit wait/notify for popup feature selection dialog
Was getting some persistent strange behaviours with this particular
invokeAndWait call, so I've swapped it out for a manually implemented
wait & notify
2021-02-07 00:41:46 +00:00