41690f84c7
Custom endpoints
...
- minor change to customise textures & session server host for custom yggdrasil server
2025-12-08 21:02:48 +01:00
jomo
c155c8d098
update dependencies
2024-02-01 22:25:43 +01:00
jomo
bba004acc7
improve URL parsing
...
uses `new URL()` and `decodeURI()` instead of `url.parse()`
also checks that the requested file is in a subdirectory of `public/` before serving the file
fixes path traversal vulnerability GHSA-5cxq-25mp-q5f2
2024-02-01 22:24:29 +01:00
jomo
9cb32a843f
strip dashes from uuids before handling them
2024-02-01 22:19:02 +01:00
jomo
56765488e0
improve test script
2020-12-12 23:37:13 +01:00
jomo
1328f98746
change old tests from usernames to uuids
2020-12-12 22:50:29 +01:00
jomo
fe5ce6b688
update dependencies, remove some devDependencies
2020-12-12 22:48:57 +01:00
jomo
a6e8e6b0f9
delete travis stuff
2020-12-12 22:45:58 +01:00
jomo
7f95a34e29
simplify http status codes, update website info
2020-03-29 07:43:23 +02:00
jomo
15a4f17560
add rate limit option for sessionserver
...
any outgoing requests to the sessionserver
that would exceed the configured rate limit are skipped
to prevent being blocked by CloudFront
if a texture hash is cached but outdated, the cache ttl will be bumped
as if the request succeeded, in order to lower requests in the near future
2020-03-29 07:43:23 +02:00
jomo
c975cc793b
remove cleaner.js
2020-03-24 18:49:42 +01:00
jomo
168457dfd9
update to node 12
2020-03-21 01:50:50 +01:00
jomo
1816b18b12
update deps
2018-02-16 18:45:56 +01:00
jomo
dff58c66e7
drop support for usernames
...
Mojang has disabled their legacy skins API:
https://twitter.com/MojangSupport/status/964511258601865216
With their API rate limits, it's now practially impossible
for us to support usernames.
Fixes #142 . The default parameter allows using:
- UUID
- URL
- MHF_Alex
- MHF_Steve
- Alex
- Steve
Contrary to UUIDs, using alex/steve doesn't redirect
and instead provides the skin from a locally stored file.
2018-02-16 18:01:41 +01:00
jomo
a25e01922e
fix cape test
...
jeb_ no longer has a cape:
{
"id": "853c80ef3c3749fdaa49938b674adae6",
"name": "jeb_",
"properties": [
{
"name": "textures",
"value": "eyJ0aW1lc3RhbXAiOjE0OTk5MDMzNDY3NTQsInByb2ZpbGVJZCI6Ijg1M2M4MGVmM2MzNzQ5ZmRhYTQ5OTM4YjY3NGFkYWU2IiwicHJvZmlsZU5hbWUiOiJqZWJfIiwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2E4NDZiODI5NjM5MjRjYjEzMjExMTIyNDg5MjYzOTQxZDE0MDM2ODlmOTAxNTExMjBkNTIzNGJlNGE3M2ZiIn19fQ=="
}
]
}
{
"timestamp": 1499903346754,
"profileId": "853c80ef3c3749fdaa49938b674adae6",
"profileName": "jeb_",
"textures": {
"SKIN": {
"url": "http://textures.minecraft.net/texture/a846b82963924cb13211122489263941d1403689f90151120d5234be4a73fb "
}
}
}
2017-07-13 12:49:09 +02:00
jomo
c02d3d33e9
don't respond with 304 on error when debugging is enabled
2016-11-07 04:08:19 +01:00
jomo
6f1c414a4a
accept ESOCKETTIMEDOUT as possible timeout error
...
seems to be a race condition which one is thrown (?)
2016-11-04 16:48:13 +01:00
jomo
f7b8fd4e8c
fix rate-limiting tests
...
Mojang is now rate-limiting calls to their sessionserver case-insensitive.
This fix skips network-based tests for an upper-cased UUID which are previously
run with the same lower-cased UUID
2016-11-03 21:52:00 +01:00
jomo
f0b73b34d1
test code style: add trailing commas
2016-11-03 21:26:35 +01:00
jomo
1d9176711f
get rid of some test log spam
2016-11-03 21:25:13 +01:00
jomo
688a34029c
wait for redis connection before running tests
2016-11-03 21:19:28 +01:00
jomo
cbe2b25835
add test for empty username
2016-11-03 21:14:32 +01:00
jomo
6594200500
Mojang updated all capes, fix tests
2016-02-07 21:06:06 +01:00
jomo
183e8cfa9c
fix tests for f088c27012c0c49ad47538373d083311dccaf7d9
2016-02-03 03:00:03 +01:00
jomo
29fa734148
remove 'public' part from Cache-Control, not required
2016-01-23 06:26:41 +01:00
jomo
4f667cc99f
remove transparency from avatar, fixes #129
2016-01-20 23:44:33 +01:00
jomo
e7242ce773
respond 304 on server error, fixes #135
2016-01-20 01:50:30 +01:00
jomo
74ba828701
add test for uuid -> username skin type update
2016-01-20 01:17:36 +01:00
jomo
1144b6755a
always use crc32 for etag, much more reliable than mojang skin hash
...
had to make quite a few changes to tests to prevent them from failing
also, etag is now only sent with a 200 response, as defined in RFC7232
2015-12-16 00:47:51 +01:00
jomo
caeb9a52fe
verbose logging on travis
2015-12-15 21:09:13 +01:00
jomo
5cb20b1105
add more crc values to tests
2015-12-14 01:59:32 +01:00
jomo
7d02138c1e
solve merge conflicts
2015-12-14 01:51:49 +01:00
jomo
3c21a59c94
add support for slim renders, fixes #125 , adjust tests
2015-12-13 14:08:59 +01:00
jomo
fb0c70d648
return HTTPERROR on 429 or 5xx, fixes #151
...
otherwise 429 or 5xx would be overwriting cached value with null for $config minutes
2015-10-21 01:02:57 +02:00
jomo
d307aec221
rename helm to overlay, fixes #127
2015-10-18 15:11:17 +02:00
jomo
b0f50cbed0
print base64 encoded body if CRC does not match
2015-10-13 00:51:03 +02:00
jomo
8b2ccf3368
add new CRC checksums
...
updated OS X + cairo, so obviously the checksums change, right? right??
2015-10-13 00:50:25 +02:00
jomo
7714e0e0ef
add case sensitive default URL tests, so 06caf589abfc4f7a552714558ac5f78abddeeabb won't happen again
2015-09-30 21:06:16 +02:00
jomo
ecfec6a407
use MHF_Steve and MHF_Alex instead of steve and alex in default parameter
...
See #142 (not fixed by this commit!)
Basically, this just adds mhf_steve and mhf_alex as special cases for the default parameter only
2015-09-30 00:38:32 +02:00
jomo
c8d74d47be
avoid reserved property names (+ test), fixes #145
2015-09-25 19:24:56 +02:00
jomo
a15cb20144
TooManyRequestsException shouldn't actually throw an error
...
all other errors thrown here are network issues, this is not.
2015-09-20 21:43:12 +02:00
jomo
9cdca6acda
don't throw strings
2015-09-20 21:28:43 +02:00
jomo
6a630f23b9
add new test CRCs for @6d12ed6
2015-09-06 00:47:17 +02:00
jomo
3a61e15abf
various networking.js improvements
...
- cleaned up some messy if/else code, replaced with nicely readable switch/case
- catch JSON.parse errors
2015-08-31 00:10:35 +02:00
jomo
755cc74170
don't update file dates
...
this was originally implemented because we wanted to delete the oldest images on disk
where 'oldest' means not *used* for the longest time
that's not useful and was never actually implemented, so we don't need this
2015-08-30 04:48:50 +02:00
jomo
607dcaf6e5
use status -2 for 404s
...
human_status (response.js) defines code -2 as 'user error'. 404 is definitely a user error, so using that makes sense.
eventually we should change the whole status code thing with #120
2015-07-17 10:09:34 +02:00
Jake
b1cdf61e4b
Change invalid request path to be a 404 rather than 422, implement status id in response module
2015-07-16 17:48:48 -05:00
Jake
7e8c65fb33
Add tests for invalid URL paths, closes #123
2015-07-16 17:31:20 -05:00
jomo
72840433cb
use proper URL encoding in tests
2015-06-25 21:55:23 +02:00
jomo
d56b10955e
add tests for uuid defaults, #115
2015-06-25 21:46:14 +02:00