Getekid / cas

A phpBB 3.3.x plugin to enable login with CAS Authentication
2 stars 3 forks source link

Add option SingleSignOut (+change gestion bug) #17

Closed pingou2712 closed 4 years ago

pingou2712 commented 4 years ago

Ok, i submit an another PR =) with: -> add option for SingleSignOut

->minor changement of gestion of bug : replace of : if (!preg_match('/[.\d-_abcdefghijklmnopqrstuvwxyz\/]*/', $this->config['cas_uri'])) to : if (!preg_match('/[.\d-_abcdefghijklmnopqrstuvwxyz\/]+/', $this->config['cas_uri'])) prevent null cas_uri for test =)

In concern : "Your DB update should exist in a file of its own (e.g. migrations/release_1_1_0.php. Some people (not many, but still) are using this plugin and this way phpBB knows to apply only the new DB changes." . Heeeeuuuuu.... I'm not sure to understand what you expect... I'm french (with very poor english) and new with all of that... but I just delete session of user of existing table... no need migration, i think?

Getekid commented 4 years ago

Hello, thanks for resubmitting the PR, please keep the language to English since that's the repo's language (my French are also a bit poor) and I'll try to keep it simple. Same rule goes for code comments.

Welcome then, in general just so you know, you'll notice that this isn't a very professional project either, it has some best practices but misses others (e.g. tests).

First let me start with a best practice:

Now for the migration. Please have a look at the migrations documentation. In short

Another thing I hadn't seen. Disabling db login breaks the site when "DB Login" is on. If it breaks the admin login then maybe changing the username/password check to both instead of one of them (i.e. change the OR check to AND).

And a last thing, it's a bit bad timing but I updated the repo to work with composer. v2.0.0 has all files to the root instead of in the getekid/cas directory.

So next steps:

Thanks again for your time and fixes, much appreciated

pingou2712 commented 4 years ago

thank you very much for your explanations. I have to finish another project at the moment and I will redo a PR as soon as possible. In addition I improve the singlesignout process, I would put it in the new version =). Good job for the update. It is indeed much better. thanks again Regards, Vincent