Commit graph

20 commits

Author SHA1 Message Date
181ebb3a63 Fix XSS attack (again)
Now escaping only for slashes, since HTML is apparently case insensitive and using a script closing tag that wasn't entirely lowercase bypassed the earlier fix.
2023-03-09 20:05:57 +01:00
1ebbe5d922 added embedded images at pasta view 2023-02-27 00:47:40 +01:00
7abb3c5d11 added support for use of a custom names file 2023-02-17 23:27:39 +01:00
528a7b6899 cleanup of various clippy lints, bad practices and simplificaiton of some code
Signed-off-by: Jade <obsidianical@gmail.com>
2023-02-17 22:14:43 +01:00
57fd472eda changes like
- xss vuln
- docker shit
+ nix shit
2023-02-17 11:28:09 +01:00
figsoda
958466818b apply clippy suggestions 2022-11-08 16:30:16 -05:00
Daniel Szabo
c6e5c6f018 Merge branch 'master' into szabodanika 2022-11-06 23:21:45 +02:00
Heng-Yi Wu
b5da40fbdc
feat: hashids 2022-11-01 21:19:54 +08:00
Daniel Szabo
44b55ae08e Getting ready for 1.2.0 release: many smaller requests implemented
- Implements #7
- Implements #42 and therefore #64
- Improved #53
- Implements #59
- Implements #61
- Implements #63
- Implements #80
- Implements #84
- Added Info page
- Removed Help page
- Bumped version number to 1.2.0
- Fixed a bug where wide mode was still 720px wide
- Created FUNDING.yml
- Reorganised arguments in README.MD and documented new options
- Updated SECURITY.MD
- Added display of last read time and read count
- Increased default width to 800px to make UI less cluttered
- Reorganised index page
- New, better attach file button

I want to spend some time testing these changes and let everyone have a look at them before tagging and releasing new artifacts.
2022-10-29 14:11:55 +03:00
Hayden
c39b778234 properly escape content 2022-10-01 20:50:05 -08:00
Daniel Szabo
7b4cd7c26e Implement upload filename sanitisation 2022-07-31 21:31:35 +01:00
Dániel Szabó
9053211904
Merge pull request #31 from dvdsk/file-size
Adds file size to pasta with an attachment
2022-07-25 13:39:00 +01:00
dvdsk
39233e9447
fixes #6 adding the size of the attached file 2022-07-14 01:08:13 +02:00
dvdsk
738e036cb5
pasta times are in systems local timezone 2022-07-13 23:55:28 +02:00
dvdsk
de2cc48f88
fixes #29 (time formating) 2022-07-13 23:54:48 +02:00
Daniel Szabo
4cc737731a Multiple enhancements and bugfixes
!Breaking change! - The updated version will not be able to read your old database file

Major improvements:
- Added editable pastas
- Added private pastas
- Added line numbers
- Added support for wide mode (1080p instead of 720p)
- Added syntax highlighting support
- Added read-only mode
- Added built-in help page
- Added option to remove logo, change title and footer text

Minor improvements:
- Improved looks in pure html mode
- Removed link to GitHub repo from navbar
- Broke up 7km long main.rs file into smaller modules
- Moved water.css into a template instead of serving it as an external resource
- Made Save button a bit bigger
- Updated README.MD

Bugfixes:
- Fixed a bug where an incorrect animal ID in a request would cause a crash
- Fixed a bug where an empty or corrupt JSON database would cause a crash
2022-06-03 17:24:34 +01:00
Daniel Szabo
cd2eea30ce Bugfix - #11
Also changed expiration date to show "Never" instead of unix epoch in the pasta list, and renamed a few variables in animalnumbers.rs to make the function more readable.
2022-05-09 22:36:13 +01:00
Daniel Szabo
36fa6598a8 File upload and persistence extension
- index.html extended with form input
- pasta.html and pastalist.html show link to /file/{pasta.id}/{filename} path
- files are saved in pasta_data folder
- all data is now stored in pasta_data/database.json
- changed pastalist.html date format to exclude year
- added custom 404 error handler
2022-05-02 16:53:10 +01:00
Dániel Szabó
f56ffa98e4 - added new pasta type URL and automatic redirection endpoint
- added water.css styling
- added CL argument to set port
- added raw URL to pasta list
2022-04-23 16:47:36 +01:00
Dániel Szabó
d42a361e95 Initial commit 2022-04-10 23:21:45 +01:00