Commit Graph

127 Commits

Author SHA1 Message Date
Daan Sprenkels
af6d762378 Stop rendering after an invalid Accept value 2020-07-06 18:01:50 +02:00
Daan Sprenkels
7a369a1dae Merge pull request 'Error with 400 Bad Request when both 'file' and 'shorten' set' (#65) from issue-56 into master 2020-07-06 17:14:38 +02:00
Daan Sprenkels
8904b648b7 Error w/ 400 when both 'file' and 'shorten' set
Fixes #56
2020-07-06 17:17:07 +02:00
Daan Sprenkels
70538f170f Add a test for issue #56 2020-07-06 17:17:07 +02:00
Daan Sprenkels
bbfe64a3a2 Merge pull request 'Add request logging to panic recovery' (#63) from issue-61 into master 2020-07-06 17:12:59 +02:00
Daan Sprenkels
5a39d6a37c Add request logging to panic recovery
Fixes #61
2020-07-06 17:15:56 +02:00
Daan Sprenkels
2883af7d31 Merge pull request 'Fix error handling in renderStatic' (#64) from issue-60 into master 2020-07-06 17:04:58 +02:00
Daan Sprenkels
d37222f82a Fix error handling in renderStatic
Fixes #60
2020-07-06 17:07:14 +02:00
badc22b8d0 Merge pull request 'db: Change db file mode to 660' (#62) from issue-58 into master 2020-06-28 12:15:57 +02:00
Daan Sprenkels
a58b9815bc Remove unused newPasteHandlerURLEncoded func; NFC 2020-05-30 19:29:27 +02:00
Daan Sprenkels
0b2297a2e8 Add a test for issue #60 2020-05-30 17:49:44 +02:00
Daan Sprenkels
77e89251e7 db: Change db file mode to 660
Fixes #58
2020-05-30 17:07:35 +02:00
Daan Sprenkels
847fd8072b Bump dependencies 2020-05-30 17:05:33 +02:00
Daan Sprenkels
5a5a0dc5ec Merge pull request 'Don't capture cursor in screenshot.' (#55) from mara/rushlink:master into master 2020-05-21 20:02:41 +02:00
dbb6a954e1 Don't capture cursor in screenshot.
Adds `-u` to maim to not capture the cursor.

However, maim still captures the cursor sometimes even with -u,
so this also switches the order to prefer `import` over `maim`,
which does not do this.
2020-05-15 13:08:18 +02:00
Daan Sprenkels
2c889e0808 Prevent directory traversal in file upload
Fixes #53
2020-05-12 20:01:03 +02:00
Daan Sprenkels
737a26fee3 test: Look for StatusFound instead of StatusOk; NFC 2020-05-12 19:09:43 +02:00
Daan Sprenkels
016ffa8949 meta: Do 410 Gone if paste deleted 2020-05-11 22:45:56 +02:00
Daan Sprenkels
b9119a0df5 meta: Fix CanDelete string 2020-05-11 22:32:35 +02:00
Daan Sprenkels
a4cec1e4b0 meta: Add a delete button 2020-05-11 22:26:45 +02:00
Daan Sprenkels
b7ea5dfa4f Redirect to /xd42/meta after upload
Fixes #51
2020-05-11 22:22:23 +02:00
Daan Sprenkels
a0c8383555 template: Fix <pre> nesting 2020-05-11 20:58:50 +02:00
bbe787da5d Merge pull request 'Make rushlink script more portable.' (#48) from mara/rushlink:master into master 2020-05-04 12:12:46 +02:00
28ddaee9d9 Make rushlink script more portable.
It didn't work on mac (and bsd, probably). Now it does.
2020-05-04 12:06:06 +02:00
Daan Sprenkels
01adfa8f2f Merge pull request 'Add a test for issue #45; NFC' (#46) from test-issue-45 into master 2020-04-27 13:00:31 +02:00
Daan Sprenkels
c57e719e15 Add a test for issue #45; NFC
Fixes #45
2020-04-27 13:00:46 +02:00
Daan Sprenkels
c0e4ac2c40 mod: Bump dependencies 2020-04-22 19:30:20 +02:00
Daan Sprenkels
b73317c249 Add generated bindata.go file to repo 2020-04-22 19:05:56 +02:00
Daan Sprenkels
8e89955ce9 Remove debug logging statement; NFC 2020-04-22 18:25:55 +02:00
Daan Sprenkels
e476797da0 db: Prevent infinite recursion when closing 2020-04-22 18:25:27 +02:00
Daan Sprenkels
728d3833c3 Change redirect status code to Temporary Redirect 2020-04-22 18:24:46 +02:00
Daan Sprenkels
42ccc18002 User url.Parse instead of url.ParseRequestURI
url.ParseRequestURI assumes the URL does not contain a fragment
identifier.  However, this is not disallowed. So we should use
url.Parse instead.

Related issue: #45
2020-04-22 16:11:32 +02:00
Daan Sprenkels
63a588ba59 db: Add docstrings to FileUpload; NFC 2020-04-22 16:00:36 +02:00
Daan Sprenkels
3da165a57b Merge pull request 'Add copy-to-clipboard button to meta page' (#44) from issue-42 into master 2020-04-14 16:08:07 +02:00
Daan Sprenkels
09481f47e6 Do not show button if clipboard not available 2020-04-05 18:46:40 +02:00
Daan Sprenkels
1dd0d17ba5 Add copy-to-clipboard button to meta page
Fixes #42.
2020-04-05 18:16:41 +02:00
Daan Sprenkels
7c0bfaee76 .gitignore: Ignore .vscode dir; NFC 2020-04-05 18:15:41 +02:00
Daan Sprenkels
a766d5d596 Update .gitignore; NFC 2020-04-05 18:12:16 +02:00
Daan Sprenkels
c28dfd0cb4 Merge pull request 'Add rushlink --screenshot.' (#41) from mara/rushlink:master into master 2020-03-26 09:37:25 +01:00
732b1fc2a6 Add rushlink --screenshot. 2020-03-24 17:25:51 +01:00
8403ad2258 Make rushlink --delete work with urls that have a file extension. 2020-03-24 14:42:54 +01:00
Daan Sprenkels
ad1ce67495 Merge pull request 'Add command line tool to submit and delete files and links.' (#39) from mara/rushlink:master into master 2020-03-23 17:00:45 +01:00
11ea63e1fc Add command line tool to submit and delete files and links.
Fixes #11.
2020-03-23 17:00:24 +01:00
Daan Sprenkels
0a35cb2508 Merge branch 'master' of gitea.hashru.nl:dsprenkels/rushlink 2020-01-05 00:15:23 +01:00
Daan Sprenkels
de19234108 return after serving meta page 2020-01-05 00:14:53 +01:00
9a690e2b8b README: restructure to accentuate building/deploying 2019-12-28 19:24:59 +01:00
ac2c62f9e6 README updated with -root_url and sample systemd unit file 2019-12-28 18:47:20 +01:00
Daan Sprenkels
095348d614 web: Add an example w/ upload from process output
Fixes #35
2019-12-19 23:29:09 +01:00
Daan Sprenkels
245dd64f82 Directly serve files instead of redirect
Fixes #28
2019-12-19 23:17:37 +01:00
Daan Sprenkels
5e6ce9c2be Replace io.Copy w/ http.ServeContent for download 2019-12-19 20:09:55 +04:00