felixrupp / user_cas

This app provides CAS authentication support for ownCloud and Nextcloud, using the phpCAS library of jasig/apereo.
Other
21 stars 24 forks source link

Plugin uses user-editable string to detect ownCloud/Nextcloud application #58

Closed drybjed closed 5 years ago

drybjed commented 5 years ago

The user_cas plugin checks the name of the instance to see if it's executing on ownCloud or Nextcloud. This is done so that the plugin integrates correctly with the application database that's different between ownCloud and Nextcloud. The specific instances of this check in the code are in:

Unfortunately, the name of the instance is user-editable. If it's changed from "Nextcloud" to something different, for example to rebrand the instance for an internal use, the plugin breaks in unexpected ways - the "CAS Login" button does not show up on the login screen, after logging in the user account is not correctly created in the database because the plugin thinks it's running in ownCloud instead of Nextcloud, etc.

I think that a better solution that autodetects the application should be used, instead of an user-editable string. Alternatively, if there's no good way to detect the type of the application, provide a toggleable option that defines the type of the application in the configuration interface.

felixrupp commented 5 years ago

Fixed with Release 1.7.1!