Commit Graph

896 Commits

Author SHA1 Message Date
Nassim Jahnke
b94de32b94
Improve safe host check
Previously you could just have a host called "epapermc.io" and it'd be safe because it ends with "papermc.io"
2022-07-25 21:17:42 +02:00
Nassim Jahnke
81cf2a0ca7
Move version formatting away from frontend again
While this is mostly to just fix Safari and other old browser not supporting regex lookbacks, having this code in JS was pretty disgusting anyways and people might appreciate having the versions already formatted in API returned objects.
2022-07-25 10:21:35 +02:00
Nassim Jahnke
4dc4c37559
Disgusting hacks to allow video embed and links
... before we either use a different sanitization lib or figure out how to move the sanitization before the markdown renderer without destroying plain text
2022-07-24 13:09:29 +02:00
Nassim Jahnke
d21dd69987
Be more lenient at md render rate limiting 2022-07-24 10:51:12 +02:00
Bjarne Koll
f624b7fec2
Create tokens with same-site policy lax (#774)
Both the HangarAuth and HangarAuth_REFRESH cookies were set with
same-site policy 'strict', preventing the browser from sending them when
opening a hangar page from a third party href, such as a plain link in a
github gist.

This prevents the server side rendering from picking up the token or
refresh token, leading the the server side rendering logic to assume an
unauthorized user is attempting to view a page eventho the user is
actually logged in.
This directly leads to hydration errors as the SSR renders the page for
a non-logged in user while the client side hydration properly detects
the logged in user and renders a potentially completely different page.
2022-07-24 10:32:00 +02:00
Owen
5aa44e6062
Fix markdown block conversions (#766) 2022-07-20 10:21:53 +02:00
Nassim Jahnke
97c301c7c4
Small cleanup 2022-07-19 20:55:46 +02:00
Nassim Jahnke
bb9ba80198
Paginate notifications, use tabs 2022-07-19 13:05:17 +02:00
Nassim Jahnke
7b1dae8726
Update docs 2022-07-18 20:37:00 +02:00
Nassim Jahnke
3a5ece5407
Move pinned project getting to UsersController 2022-07-18 19:36:40 +02:00
Nassim Jahnke
a803c85984
Fix pinned versions showing deleted versions 2022-07-18 14:10:51 +02:00
Nassim Jahnke
a320eaad37
Hotfix md code segments and images
... by moving the html sanitization after the markdown rendering and breaking task lists and youtube video embeds
2022-07-18 13:15:58 +02:00
Nassim Jahnke
270cae8b76
Allow summary tag 2022-07-17 20:59:15 +02:00
Nassim Jahnke
30e167c677
Also allow image tags 2022-07-17 20:51:01 +02:00
Nassim Jahnke
3fc82c05da
Use OWSASP html sanitizer instead of flexmark escaper
Closes #633
2022-07-17 20:39:25 +02:00
Nassim Jahnke
70a825edbc
Show amount of reports/required approvals in staff dropdown 2022-07-17 15:31:34 +02:00
Nassim Jahnke
d2058d5e17
Actually fix version list order 2022-07-17 14:13:10 +02:00
Nassim Jahnke
e467c51153
Hotfix pinned channel display 2022-07-17 13:47:15 +02:00
Nassim Jahnke
e01467cb58
Make frozen channels (release channel) pinnable 2022-07-17 12:42:23 +02:00
Nassim Jahnke
fd3c57fd23
Paginate reports, add resolved reports tab 2022-07-14 11:03:25 +02:00
Nassim Jahnke
e4ec1ad172
Ignore case when sorting by username
Fixes #748
2022-07-14 09:28:28 +02:00
Nassim Jahnke
95c88e673d
Display report notifications 2022-07-13 23:08:02 +02:00
Nassim Jahnke
a989c8991a
Fix things up a bit 2022-07-13 22:35:39 +02:00
Nassim Jahnke
9f9f8520e4
Let staff send notifications during report resolving
TODO: Display them under their respective report in the flags page
2022-07-13 21:49:59 +02:00
Nassim Jahnke
c4fce0906c
Send notifications on visibility change of projects 2022-07-13 17:30:36 +02:00
Nassim Jahnke
cf1d7c6c9b
Padding 2022-07-10 22:05:22 +02:00
Alessio Gravili
1642240e5b
Random stuff with icons (#737)
* Clickable tag for channels

* Improve platforms checkbox in project versions page

* Add platform icon for new version upload page

* Add category logo to project card

* Add icons for licenses

* Fix Type "LPGL" => "LGPL"
2022-07-10 17:15:49 +02:00
MiniDigger | Martin
2d67f2ddb1 move logo to lib and resize it, error handling for logout 2022-07-08 21:13:41 +02:00
Nassim Jahnke
cc38da7a95
Finish project/version deletion and restoring 2022-07-05 18:10:37 +02:00
Nassim Jahnke
4b77ae6378
Add suffix to deleted projects/versions
This allows users to recreate a project or version under the same name without having to wait for staff to fully delete it and without needing to give users the ability to update version files/links later on.
Todo: Make sure deleted versions don't get into download buttons, remove suffix when project/version is restored
2022-07-05 13:26:13 +02:00
Nassim Jahnke
f1ea814300
still wrong 2022-07-05 12:00:07 +02:00
Nassim Jahnke
65106dde24
Don't push the wrong db migration 2022-07-05 11:58:10 +02:00
Nassim Jahnke
b314541cfd
Don't forget the db migration 2022-07-05 11:57:05 +02:00
Nassim Jahnke
7b55c62308
Start working on pinned projects
Missing actually pinning projects on the userpage on frontend, endpoint should also return Project instead of ProjectCompact
2022-07-05 11:53:59 +02:00
Nassim Jahnke
f9c4d652df
Add platform versions to download dropdown 2022-07-02 14:25:32 +02:00
Nassim Jahnke
41b39a37f1
Improvements to project/org/version creation design 2022-07-01 18:21:12 +02:00
Nassim Jahnke
9e84c06db3
Small project list improvements
Show category, show more info on smaller displays
2022-06-29 23:10:24 +02:00
Nassim Jahnke
10c8d5eccf
Add simple mc version filtering 2022-06-27 19:32:25 +02:00
Nassim Jahnke
94d74ffc15
Add db migration for tags/recommended versions/promoted versions 2022-06-27 18:20:02 +02:00
Nassim Jahnke
441ba27537
Sort member list by rank, some role changes
Changes are currently not applied to staging, the current role table has to be truncated first
2022-06-27 13:43:16 +02:00
Nassim Jahnke
90424e814d
More rate limiting 2022-06-27 12:55:15 +02:00
Nassim Jahnke
65bd042caa
Remove recommended version setting
Missing migrations, possibly broke controller?
2022-06-26 20:50:04 +02:00
Nassim Jahnke
f58c1f3011
Remove tags 2022-06-24 22:50:18 +02:00
Jake Potrebic
429f963ea2
flatten db
run flyway:baseline after deleting the flyway table to keep all existing data
2022-06-21 19:52:05 -07:00
Jake Potrebic
0c63be2a90
work on pinned versions 2022-06-21 12:59:09 -07:00
Nassim Jahnke
ea9149baac
Fix query typo 2022-06-21 20:02:12 +02:00
Jake Potrebic
f10552bb75
adjustments/improvements to pinned versions 2022-06-21 10:21:27 -07:00
Jake Potrebic
1ec32bf8dd
add project channel to pinned version 2022-06-21 01:28:15 -07:00
Jake Potrebic
4811a391e5
actually commit the sql changes 2022-06-21 00:56:45 -07:00
Jake Potrebic
a3369d2d9e
replace promoted versions with pinned versions 2022-06-21 00:21:03 -07:00