Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating to ILIAS 9 Opencast objects do not work if stream security is enabled #409

Open
DZenker opened this issue Mar 6, 2025 · 3 comments
Assignees
Labels
bug Something isn't working ILIAS 9 Issue appears or may only appear on ILIAS 9.

Comments

@DZenker
Copy link

DZenker commented Mar 6, 2025

Describe the bug
We've just updated our ILIAS to ILIAS 9, but the Opencast repo objects and page content don't work anymore if stream security is enabled.

Log
TypeError thrown with message "xoctSecureLink::sign(): Argument #3 ($restict_ip) must be of type ?bool, string given, called in /srv/www/ilias7.hs-fresenius.de/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctSecureLink.php on line 61"

Stacktrace:
#22 TypeError in /srv/www/ilias7.hs-fresenius.de/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctSecureLink.php:25
#21 xoctSecureLink:sign in /srv/www/ilias7.hs-fresenius.de/ilias/Customizing/global/plugins/Services/Repository/RepositoryObject/OpenCast/classes/class.xoctSecureLink.php:61
...

Environment (please complete the following information):

  • ILIAS version: 9.7
  • PHP version: 8.2.27
  • Plugin version: 9.0.2
  • Opencast version: 16.9
  • Browser: all

e6u9i_8911.log

@DZenker
Copy link
Author

DZenker commented Mar 6, 2025

Additional info: if the option "sign thumbnail link" is deactivated, it's working again. But, of course, no thumbnails show up anymore in the Opencast object...

@reiferschris
Copy link
Contributor

Not sure what the intention in the code was, but it's weird. In https://github.com/opencast-ilias/OpenCast/blob/release_9/src/Util/Player/StandardPlayerDataBuilder.php#L306 there is already a check if the config option is enabled so removing it in xoctSecureLink should be fine from what I understand.

Does it work if you change:
https://github.com/opencast-ilias/OpenCast/blob/release_9/classes/class.xoctSecureLink.php#L25 to
protected static function sign(string $url, ?string $valid_until = null, ?string $restict_ip = null)

and
https://github.com/opencast-ilias/OpenCast/blob/release_9/classes/class.xoctSecureLink.php#L69 to
return self::sign($url, $valid_until);
?

@dagraf dagraf added the ILIAS 9 Issue appears or may only appear on ILIAS 9. label Mar 6, 2025
@dagraf dagraf moved this from Backlog to Ready in Opencast & Opencast PageComponent Mar 6, 2025
@chfsx chfsx moved this from Ready to Testing in Opencast & Opencast PageComponent Mar 6, 2025
@chfsx
Copy link
Contributor

chfsx commented Mar 6, 2025

PR with fix: #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ILIAS 9 Issue appears or may only appear on ILIAS 9.
Projects
Status: Testing
Development

No branches or pull requests

4 participants