Our handling of uploaded files (see FilesController#show_protected_upload) checks for the full file name including the file path. However, URLs generated by CarrierWave didn't contain any path information resulting in invalid URLs. The wrong behavior was only visible when serving native files was disabled in Rails (or by using the x_sendfile_header).
Previously, an exception was caused by the tubesock gem but not sent to Sentry. This caused errors not to bubble up correctly but rather kill the current thread, leaving the user with a generic "WebSocket connection not established" message.
Probably, this should be removed when updating the WebSocket implementation.
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).
An invalid XML response may be returned if the LTI provider is unavailable and cannot handle our request. We decided against logging in Sentry as this affects a third party functionality we cannot fix ourselves.
Fixes CODEOCEAN-G2
Also align how we use query Postgres from controllers.
The change is mainly due to regular (but not reproducible) issues with the `intervalstyle` defaulting to `postgres` (instead of `iso8601`) and thereby causing issues. We're just experimenting to see whether this change resolves the issue.
* 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)
Hypothesis: When unloadAutoSave was called, we first saved (causing this.autosaveTimer to become null) and then tried to clearTimeout on this variable (= on null). This probably never worked?
Hopefully closes CODEOCEAN-B5
Previously, a user-defined test (those run with "Test" instead of "Run") would cause a flash message and a Sentry error if anything was printed to StdErr. As this might happen during user code execution (and therefore is no error), we remove this warning. All existing errors are already caught (compare with enum status in testrun.rb), so it's fine for now.
Fixes CODEOCEAN-BT