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

IIS and Two Factor Authenticator plugin white bar #209

Open
ntozier opened this issue Aug 11, 2021 · 2 comments
Open

IIS and Two Factor Authenticator plugin white bar #209

ntozier opened this issue Aug 11, 2021 · 2 comments

Comments

@ntozier
Copy link
Contributor

ntozier commented Aug 11, 2021

The Authenticator configuration does not appear to work under IIS.
note: configuration of email works as expected.

Environment:
osTicket 1.15.3.1
webserver IIS 10
PHP 7.3.19

Steps to reproduce and notes:

Installed and enabled the Two Factor Authenticator plugin.
Go to Agent profile.
Click on Configure Options.
2021-08-11_12-27-56

Click on Authenticator results in the white bar of doom
2021-08-11_12-23-09

Opening the Console I see that this is throwing a 500 error.
2021-08-11_12-24-35

PHP error logs do not contain any new entries.

IIS logs suck.

2021-08-11 16:16:37 192.168.45.6 GET /scp/ajax.php/staff/2/2fa/configure - 80 - 192.168.76.107 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/92.0.4515.131+Safari/537.36 http://test.nhpartnership.org/scp/profile.php 200 0 0 600
2021-08-11 16:16:41 192.168.45.6 GET /scp/ajax.php/staff/2/2fa/configure/auth.agent - 80 - 192.168.76.107 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/92.0.4515.131+Safari/537.36 http://test.nhpartnership.org/scp/profile.php 500 0 0 600
2021-08-11 16:17:42 192.168.45.6 GET /scp/ajax.php/staff/2/2fa/configure/auth.agent - 80 - 192.168.76.107 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/92.0.4515.131+Safari/537.36 - 500 0 0 590
2021-08-11 16:22:21 192.168.45.6 GET /scp/ajax.php/staff/2/2fa/configure - 80 - 192.168.76.107 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/92.0.4515.131+Safari/537.36 http://test.nhpartnership.org/scp/profile.php 200 0 0 436
2021-08-11 16:22:27 192.168.45.6 GET /scp/ajax.php/staff/2/2fa/configure/auth.agent - 80 - 192.168.76.107 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/92.0.4515.131+Safari/537.36 http://test.nhpartnership.org/scp/profile.php 500 0 0 598
@TechCare-Aus
Copy link

I don't know if this has been resolved or if you want me to start my own issue? Let me know.

@ntozier @JediKev - I just attempted to set this up too and same issue with my server, but it is not iis rather apache. Email 2FA works. Authenticator 2FA does not. Same errors apart from the IIS logs.

image

Php error:

[01-Oct-2022 05:06:26 UTC] PHP Fatal error:  Uncaught TypeError: Sonata\GoogleAuthenticator\GoogleQrUrl::generate(): Argument #2 ($secret) must be of type string, null given, called in phar:///home/USERNAME/public_html/help/include/plugins/auth-2fa.phar/class.auth2fa.php on line 150 and defined in phar:///home/USERNAME/public_html/help/include/plugins/auth-2fa.phar/lib/Sonata/GoogleAuthenticator/GoogleQrUrl.php:59
Stack trace:
#0 phar:///home/USERNAME/public_html/help/include/plugins/auth-2fa.phar/class.auth2fa.php(150): Sonata\GoogleAuthenticator\GoogleQrUrl::generate('USER@USERNAME...', NULL, 'USERNAMESupport')
#1 phar:///home/USERNAME/public_html/help/include/plugins/auth-2fa.phar/class.auth2fa.php(17): Auth2FABackend->getQRCode(Object(StaffSession))
#2 /home/USERNAME/public_html/help/include/class.2fa.php(94): Auth2FABackend->getSetupOptions()
#3 /home/USERNAME/public_html/help/include/ajax.staff.php(279): TwoFactorAuthenticationBackend->getSetupForm(Array)
#4 /home/USERNAME/public_html/help/include/class.dispatcher.php(151): StaffAjaxAPI->configure2FA('1', 'auth.agent')
#5 /home/USERNAME/public_html/help/include/class.dispatcher.php(38): UrlMatcher->dispatch('/1/2fa/configur...', Array)
#6 /home/USERNAME/public_html/help/include/class.dispatcher.php(120): Dispatcher->resolve('/1/2fa/configur...', Array)
#7 /home/USERNAME/public_html/help/include/class.dispatcher.php(38): UrlMatcher->dispatch('/staff/1/2fa/co...', NULL)
#8 /home/USERNAME/public_html/help/scp/ajax.php(326): Dispatcher->resolve('/staff/1/2fa/co...')
#9 {main}
  thrown in phar:///home/USERNAME/public_html/help/include/plugins/auth-2fa.phar/lib/Sonata/GoogleAuthenticator/GoogleQrUrl.php on line 59

@themanbornwithin
Copy link

Good Evening, I'm not sure if the cause is the same, but I was having issues with the OAUTH plugin and the white bar on IIS. I had to add the following to my web.config to correct the white bar issue.

<system.web> <httpRuntime requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,\,?" /> </system.web>
I put my findings and how I discovered it in the Best Answer here: https://forum.osticket.com/d/101808-oauth2-issues-reverse-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants