Author Topic: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"  (Read 9981 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
Quote from: rcschaff link=topic=8348.0
...

Quote from: rcschaff link=topic=8239.0
...

Hi "rcschaff"

First of all i want to congratulate you for the excellent work done by "rcschaff".

I did the installation following the official guide provided by "rcschaff" at this link:

https://www.youtube.com/watch?v=Uc9pglbZo6I

I have done all the steps correctly:

1 - Open firewall port number 2304 TCP/IN and TCP/OUT for IPv4 and  IPv6

2 - Correctly created CWP PRO Api access management key with correct options:

Flagged List > Account

Flagged List > Account Details

Flagged List > Domains and subdomains

3 - Installed module via ssh shell with this command officialy provided by "rcschaff" at this link https://github.com/rcschaff82/cwp_2fa

Code: [Select]
wget -O - https://github.com/rcschaff82/cwp_2fa/tarball/master | tar xz
Code: [Select]
cd rcschaff82-cwp_2fa-*
Code: [Select]
./install.sh
When prompted, i have put my API key.

Under CWP Admin Panel (Root user) menu > User Accounts > Features,Themes,Languages > Themes i have correctly activated the modified theme disallowed users to chenge the theme and flagged option "Hide theme change.

Having said that i have to report two bugs and / or errors:

Bug and / or Error:

Go to Menu: 2Factor Auth > Manage users

And have this bug and / or errors:

"Notice: Trying to get property 'msj' of non-object in /usr/local/cwpsrv/htdocs/resources/admin/modules/user2fa.php on line 19

Warning: Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/user2fa.php on line 19

Notice: Undefined variable: userpost in /usr/local/cwpsrv/htdocs/resources/admin/modules/user2fa.php on line 62

Warning: Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/user2fa.php on line 62"


The module works for two-factor authentication for Admin Control Panel (Root) but it does not work for the User Control Panel as once the password has been entered it continues to load continuously without ever displaying the field where the 2FA code can be entered.

Screenshot of bug and/or errors:



So i ask you to help me solve these problems.

In addition, i also ask you the courtesy of being able to post here the commands to be able to uninstall your module completely cleanly from the SSH shell if i need it.

I also remind all those who will read this post that if they wanted to do so they can donate to "rcschaff" for creating this very useful module.

If you would like to donate to the project, "rcschaff" accept donations at: https://paypal.me/rcschaff

Dear "rcschaff" thanks in advance for the support.
« Last Edit: May 02, 2020, 02:14:54 PM by Automata »


« Stay hungry, stay foolish. »

Offline
****
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #1 on: May 02, 2020, 04:16:25 PM »
That specific error has to do with not being able to pull a list of accounts from the api.

Could you verify that the API endpoint is eunning.
netstat -aptn | grep 2304

As for uninstall, you can manually reverse the steps of in install.sh, bit I will add an uninstall script soon.
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #2 on: May 02, 2020, 08:54:24 PM »
That specific error has to do with not being able to pull a list of accounts from the api.

Could you verify ...

Hi "rcschaff" and thanks for the support.

I used the command suggested by you:

Code: [Select]
netstat -aptn | grep 2304
This is the output:

"tcp        0      0 0.0.0.0:2304            0.0.0.0:*               LISTEN      1489/cwpsrv: master"

It's correct ?

Unfortunately, the reported errors persist and i cannot access the User Control Panel.

In addition, i also have problems with the use of special characters in the Root user password, if i use them, it won't let me down, you could list all the special characters allowed?

Furthermore, in order not to be wrong, i ask you the courtesy of being able to post here the complete commands to uninstall your module, i ask you because i would not want to make mistakes.

If you can help me solve these problems i would be very grateful to you.

Thanks in advance for the support.
« Last Edit: May 02, 2020, 08:56:07 PM by Automata »


« Stay hungry, stay foolish. »

Offline
****
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #3 on: May 03, 2020, 12:33:15 AM »
Ok.  Verify that the API key has access to accounts-List

As for uninstall, I will create a script.  I have already added it as an issue on the GitHub page.
Google Hangouts:  rcschaff82@gmail.com

Offline
****
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #4 on: May 03, 2020, 12:34:49 AM »
As for special characters, that should have been resolved.  Please tell me what characters aren't working for you.
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #5 on: May 05, 2020, 01:37:21 AM »
As for special characters, that should have been resolved.  Please tell me what characters aren't working for you.

Hi "rcschaff",

This is the special character i have used:

,@)(+{`&<~=."!']*>~\%|-_

Also i would like to uninstall your module and then do a clean installation again.

You can help me uninstall your module cleanly and completely, you can tell me the commands to use, i would be very grateful to you.

Thanks in advance for the support.


« Stay hungry, stay foolish. »

Offline
****
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #6 on: May 05, 2020, 02:05:15 AM »
if you check the github page, I have made updates with an uninstall script, and also do away with the API calls.
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #7 on: May 05, 2020, 02:14:14 AM »
if you check the github page, I have made updates with an uninstall script, and also do away with the API calls.

Hi i have used your uninstall script and unfortunately it no longer lets me access the CWP Administrator Control Panel !

Please help me to solve this problem.


« Stay hungry, stay foolish. »

Offline
**
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #8 on: May 05, 2020, 02:17:45 AM »
if you check the github page, I have made updates with an uninstall script, and also do away with the API calls.

I have this error:

my.cwp.admin.ip:port/login/index.php

404 Not Found
cwpsrv

And this error:

** (pkttyagent:5029): WARNING **: 04:17:19.956: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
Redirecting to /bin/systemctl restart httpd.service

** (pkttyagent:5096): WARNING **: 04:17:20.243: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
Redirecting to /bin/systemctl reload httpd.service

** (pkttyagent:5139): WARNING **: 04:17:20.649: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)

Please help me, thanks !


« Stay hungry, stay foolish. »

Offline
**
Re: [BUG - ERROR] Two Factor Authorization Mod - CWP_2FA by "rcschaff"
« Reply #9 on: May 05, 2020, 03:13:08 AM »
...

All problems were solved very quickly thanks to the help provided by "rcschaff" through private messages.

I want to personally thank "rcschaff" who has proven to be an excellent programmer and also very patient, courteous and helpful.

Thanks so much "rcschaff" !

 :)


« Stay hungry, stay foolish. »