[3.2][DEV] phpBB two factor authentication

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
AbaddonOrmuz
Registered User
Posts: 618
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by AbaddonOrmuz » Sun Apr 07, 2019 4:39 am

Hi Paul,

I've briefly tested this extension and it's working so far, I understand that your have been busy but I wonder if there's a roadmap or a list of tasks to do, maybe the community could help with the development, this is something I would like to use on one of my boards.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Arch Linux user

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25194
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul » Sun Apr 07, 2019 9:10 am

The most important part is testing (And then especially the develop branch, as that contains the most recent code). I will see if I can make an actual release from that branch today, but I need to check what the exact status is of that branch.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25194
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul » Sun Apr 07, 2019 12:02 pm

Okay, I have made a bunch of fixes an a few language related changes, and made a new release.

Download: https://github.com/paul999/phpbb_2fa/re ... tag/v0.0.3
Please note: You should not really use this on a live board, unless you know what you are doing ;).
Please let me know if it works for you, or if you are having issues. Without any of those I won't be able to improve it (And I won't submit it to the CDB unless I receive some feedback!).

For translations:
Please create a pull request on github containing the changes needed for your translation. I won't accept translations that aren't submitted as PR, or are incomplete.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

ivellios1988
Registered User
Posts: 13
Joined: Sat Jun 05, 2010 11:42 am

Re: [3.2][DEV] phpBB two factor authentication

Post by ivellios1988 » Sun Apr 07, 2019 1:40 pm

Well, I may be crazy but I decided to take a risk and test this extension on a live board :twisted: With codes served by Google Authenticator and other authenticator apps it works perfectly fine, excerpt for that it keeps logging users out after some period of time, and it happens even to users who checked the 'remember me' field when logging on.

I haven't tested it with U2F yet.

User avatar
AbaddonOrmuz
Registered User
Posts: 618
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by AbaddonOrmuz » Sun Apr 07, 2019 2:41 pm

ivellios1988 wrote:
Sun Apr 07, 2019 1:40 pm
it works perfectly fine, excerpt for that it keeps logging users out after some period of time, and it happens even to users who checked the 'remember me' field when logging on.
I'm pretty sure that's a phpBB feature, session expires after some time if you do nothing, I've experienced that here when I leave an open tab.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Arch Linux user

User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: [3.2][DEV] phpBB two factor authentication

Post by tojag » Wed Apr 10, 2019 9:19 am

First attempt with v.0.0.3 in test environment - phpBB3.2.5, xampp3.2.2 (PHP7.2.6, MySQLi 10.1.33-MariaDB)
After trying to turn on the 2FA extension:

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
and the extension can't on.
Something with php settings?
Sorry my english. I hope You understand what I mean.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25194
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul » Wed Apr 10, 2019 10:42 am

You will need to increase the memory limit in php.ini.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: [3.2][DEV] phpBB two factor authentication

Post by tojag » Wed Apr 10, 2019 11:46 am

As always I have 128MB. I checked it before write here.

Under InterentExplorer and Chrome

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
Sorry my english. I hope You understand what I mean.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25194
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul » Wed Apr 10, 2019 2:13 pm

The browser doesn't matter with php error ;). It tries to allocate over 128MB, so that means you will need to increase it.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

nou nou
Registered User
Posts: 328
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][DEV] phpBB two factor authentication

Post by nou nou » Tue Apr 23, 2019 5:57 am

Hello! I thought I'd give this a shot :)

I have a very similar - if not identical - error trying to enable on a shared hosting test server:

Code: Select all

[Mon Apr 22 22:45:58 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 94371840 bytes exhausted (tried to allocate 2097152 bytes) in [filepath]/phpbb/db/migrator.php on line 953, referer: https://[forumurl]/adm/index.php?i=acp_extensions&sid=3d0498930f814a3588e7578f91f70a97&mode=main&action=enable_pre&ext_name=paul999%2Ftfa
White screen in the browser, extension not enabled, though some database data is seemingly being created (I see the 'delete data' option appear in the Manage Extensions ACP screen after doing this).

I have never encountered this error and I am running (and testing) a LOT of extensions. Are you sure that there is nothing iffy going on at the extension level?

Could I ask what is the memory limit you would recommend for this extension (and why would it appear to need a lot)? Before I try fiddling with mine...

Thanks!

User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: [3.2][DEV] phpBB two factor authentication

Post by tojag » Wed Apr 24, 2019 1:00 pm

After increase memory limit to 256M.

Code: Select all

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
After increase limit to 512MB.

Code: Select all

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in C:\xampp726\htdocs\phpBB3\phpbb\db\migrator.php on line 953
and still can't ON the extension :(
ivellios1988 wrote:
Sun Apr 07, 2019 1:40 pm
Well, I may be crazy but I decided to take a risk and test this extension on a live board :twisted: With codes served by Google Authenticator and other authenticator apps it works perfectly fine,
What version of phpBB, php, mysql do You use?
Sorry my english. I hope You understand what I mean.

ivellios1988
Registered User
Posts: 13
Joined: Sat Jun 05, 2010 11:42 am

Re: [3.2][DEV] phpBB two factor authentication

Post by ivellios1988 » Wed Apr 24, 2019 9:24 pm

PHP: 5.6.40
phpBB: 3.2.5
MySQL 5.6.42-log
My forum runs on shared hosting in OVH. Memory limit is 512 megabytes.

User avatar
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

Re: [3.2][DEV] phpBB two factor authentication

Post by tojag » Thu Apr 25, 2019 1:41 pm

Thanks for the info. PHP 5.6.40 is very old.
Paul, is there any requirements for PHP version?
Sorry my english. I hope You understand what I mean.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25194
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][DEV] phpBB two factor authentication

Post by Paul » Thu Apr 25, 2019 5:56 pm

No, it has the same requirements as phpBB itself.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

nou nou
Registered User
Posts: 328
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][DEV] phpBB two factor authentication

Post by nou nou » Thu May 09, 2019 5:46 am

Just wanting to ask specifically - is it normal that the memory requirements for activating the extension are very high seeming? I've so far not encountered an extension I can't enable for lack of memory. But it could be the nature of this beast, of course :)

Post Reply

Return to “Extensions in Development”