Commit Graph

13 Commits

Author SHA1 Message Date
17dd8b1267 Change syntax for routes with filename
Previously, the filename was URL-encoded, thus each / was replaced with %2F. This caused issues with some Apache2 configuration, smartly mingling with the URL to either encode it a second time (resulting in %252F) or decoding it (generating a real /). However, for authenticated file downloads with the JWT, we hardly require a byte-by-byte matching. With these changes, the URL parameter is no longer URL-encoded, so that Apache2 won't break our implementation any longer.

Further, we use this opportunity to get rid of the unnecessary .json extension for those filename routes, simplifying the routes generated and doing some further cleanup.
2024-01-19 11:06:40 +01:00
8fc5123bae Exclusively lock Runners during code executions
Previously, the same runner could be used multiple times with different submissions simultaneously. This, however, yielded errors, for example when one submission time oud (causing the running to be deleted) while another submission was still executed.

Admin actions, such as the shell, can be still executed regardless of any other code execution.

Fixes CODEOCEAN-HG
Fixes openHPI/poseidon#423
2023-10-31 12:35:24 +01:00
a1941336d9 Fix Runner access for programming groups
* We also rename the corresponding columns in the Runner model, so that for polymorphic association gets clear.
2023-08-24 19:32:06 +02:00
5faf5be033 Fix Rubocop offenses 2023-07-27 09:32:45 +02:00
17356c3045 Allow redirect to main CodeOcean host
When a file cannot be retrieved any longer, we send a redirect to the previous locations. As we usually enable a different render host, Rails sees this redirect as a redirect to another host (from the render host to the main CodeOcean host).
2022-12-19 16:06:47 +01:00
90b30e2bf7 Upgrade to Rails 7.0 and apply new framework defaults
* Remove `send_stream` method pulled in before upgrading Rails
* Remove spring, it is no longer included by default for new apps
* Remove deprecated options from environments
* Remove old asset paths and workarounds no longer needed
* Remove unnecessary `OAUTH_10_SUPPORT` const, LTI still uses OAuth 1.0
* Dump schema with new defaults (and specify precision for timestamps where needed)
2022-12-04 15:21:59 +01:00
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
b6cecf53aa Pundit: Skip authorization in case of errors
Fixes CODEOCEAN-F3
2022-11-17 21:37:45 +01:00
55d7fb2f9a Download file: Return after rendering NotAuthorized Error
Fixes CODEOCEAN-ET
2022-11-14 18:21:35 +01:00
60f8d9809b Catch error in LiveStreams Controller to avoid concurrency issue 2022-11-10 12:00:56 +01:00
de024d9360 Set Content-Type to fixed value for send_runner_file 2022-11-04 16:52:49 +01:00
58548555a5 Shell: Add file system browser to retrieve arbitrary files 2022-10-29 18:49:18 +02:00
60078701f5 Editor: Allow file retrieval after code run 2022-10-29 18:49:18 +02:00