digitalpoint
Well-known member
So it worked to add 1 key for a user and gave an error when deleting it or adding a second one?
SELECT provider_data FROM xf_user_tfa WHERE provider_id = 'security_key' AND user_id = {user_id_having_issue};
#0 src/addons/DigitalPoint/Security/Tfa/SecurityKey.php(74): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/*****/...', 74, Array)
#1 src/addons/DigitalPoint/Security/XF/Pub/Controller/Account.php(132): DigitalPoint\Security\Tfa\SecurityKey->verify('setup', Object(SV\DailyStatistics\XF\Entity\User), Array, Object(XF\Http\Request))
#2 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Security\XF\Pub\Controller\Account->actionTwoStepAdd(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'TwoStepadd', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}
array(4) {
["url"] => string(34) "/account/two-step/security_key/add"
["referrer"] => string(62) "/account/two-step/security_key/add"
["_GET"] => array(0) {
}
["_POST"] => array(7) {
["_xfToken"] => string(8) "********"
["name"] => string(6) "name_username"
["payload"] => string(0) ""
["step"] => string(7) "confirm"
["_xfRequestUri"] => string(34) "/account/two-step/security_key/add"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
#0 src/addons/DigitalPoint/Security/Tfa/SecurityKey.php(86): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/*****/...', 86, Array)
#1 src/addons/DigitalPoint/Security/XF/Pub/Controller/Account.php(132): DigitalPoint\Security\Tfa\SecurityKey->verify('setup', Object(SV\DailyStatistics\XF\Entity\User), Array, Object(XF\Http\Request))
#2 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Security\XF\Pub\Controller\Account->actionTwoStepAdd(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'TwoStepadd', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}
array(4) {
["url"] => string(34) "/account/two-step/security_key/add"
["referrer"] => string(62) "/account/two-step/security_key/add"
["_GET"] => array(0) {
}
["_POST"] => array(7) {
["_xfToken"] => string(8) "********"
["name"] => string(6) "name_username"
["payload"] => string(0) ""
["step"] => string(7) "confirm"
["_xfRequestUri"] => string(34) "/account/two-step/security_key/add"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Give the user a better error message if they try to create a Passkey entry without actually registering a Passkey.
It would be impossible with this addon because Passkeys and security keys aren’t one time passwords. It’s public/private key encryption. The hardware is asked to decrypt something that only it can decrypt (the private key used for decryption is internal to the device). Can’t do that over text.How difficult would it be to make sending OTP via text? Are there server requirements for it?
ErrorException: [E_DEPRECATED] substr(): Passing null to parameter #1 ($string) of type string is deprecated src\addons\DigitalPoint\Security\Entity\UserExtra.php:40
Generated by: Nicolas Feb 8, 2023 at 2:35 PM
Stack trace
#0 [internal function]: XF::handlePhpError(8192, '[E_DEPRECATED] ...', 'C:\\laragon\\www\\...', 40)
#1 src\addons\DigitalPoint\Security\Entity\UserExtra.php(40): substr(NULL, 0, 2)
#2 src\XF\Mvc\Entity\Entity.php(798): DigitalPoint\Security\Entity\UserExtra->verifyCountry(NULL, 'country', 5, Array)
#3 src\XF\Mvc\Entity\Entity.php(643): XF\Mvc\Entity\Entity->_verifyValueCustom(NULL, 'country', 5, Array)
#4 src\XF\Mvc\Entity\Entity.php(577): XF\Mvc\Entity\Entity->set('country', NULL)
#5 src\addons\DigitalPoint\Security\Repository\UserExtra.php(19): XF\Mvc\Entity\Entity->__set('country', NULL)
#6 src\addons\DigitalPoint\Security\XF\Entity\UserRemember.php(30): DigitalPoint\Security\Repository\UserExtra->logExtra(42, 'user_remember')
#7 src\addons\DigitalPoint\Security\XF\Entity\UserRemember.php(23): DigitalPoint\Security\XF\Entity\UserRemember->logExtra()
#8 src\XF\Mvc\Entity\Entity.php(1277): DigitalPoint\Security\XF\Entity\UserRemember->_postSave()
#9 src\XF\Repository\UserRemember.php(17): XF\Mvc\Entity\Entity->save()
#10 src\XF\ControllerPlugin\Login.php(282): XF\Repository\UserRemember->createRememberRecord(1)
#11 src\XF\ControllerPlugin\Login.php(219): XF\ControllerPlugin\Login->createVisitorRememberKey()
#12 src\XF\Pub\Controller\Login.php(125): XF\ControllerPlugin\Login->completeLogin(Object(XenAddons\LD\XF\Entity\User), true)
#13 src\XF\Mvc\Dispatcher.php(352): XF\Pub\Controller\Login->actionLogin(Object(XF\Mvc\ParameterBag))
#14 src\XF\Mvc\Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Login', 'Login', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Login), NULL)
#15 src\XF\Mvc\Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Login), NULL)
#16 src\XF\Mvc\Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src\XF\App.php(2483): XF\Mvc\Dispatcher->run()
#18 src\XF.php(524): XF\App->run()
#19 index.php(20): XF::runApp('XF\\Pub\\App')
#20 {main}
array(4) {
["url"] => string(27) "/test/index.php?login/login"
["referrer"] => string(32) "https://localhost/test/index.php"
["_GET"] => array(1) {
["login/login"] => string(0) ""
}
["_POST"] => array(5) {
["_xfToken"] => string(8) "********"
["login"] => string(7) "Nicolas"
["password"] => string(8) "********"
["remember"] => string(1) "1"
["_xfRedirect"] => string(32) "https://localhost/test/index.php"
}
}
It wouldn't be terribly hard, but going out of your way to take away user's ability to manage their own sessions might not be the best idea. Pretty much every major website allows users to see their session data so they can see if there are any that are unexpected. For example...Are there any plans to make what's shown to each usergroup selectable? IMO, most users are overwhelmed by this type of data, not realizing how much info they provide to a website with every login/click they make. I think the IP and Session data is very useful from an Admin standpoint, but I'd prefer to not present that info to the members.
I can see the data being useful from an Admin standpoint however, especially when looking at accounts that may be spam/scam related.
If you edit the DigitalPoint/Security/Entity/UserExtra.php file, change this:On a local XF with the last release:
Code:ErrorException: [E_DEPRECATED] substr(): Passing null to parameter #1 ($string) of type string is deprecated src\addons\DigitalPoint\Security\Entity\UserExtra.php:40 Generated by: Nicolas Feb 8, 2023 at 2:35 PM
Code:Stack trace #0 [internal function]: XF::handlePhpError(8192, '[E_DEPRECATED] ...', 'C:\\laragon\\www\\...', 40) #1 src\addons\DigitalPoint\Security\Entity\UserExtra.php(40): substr(NULL, 0, 2) #2 src\XF\Mvc\Entity\Entity.php(798): DigitalPoint\Security\Entity\UserExtra->verifyCountry(NULL, 'country', 5, Array) #3 src\XF\Mvc\Entity\Entity.php(643): XF\Mvc\Entity\Entity->_verifyValueCustom(NULL, 'country', 5, Array) #4 src\XF\Mvc\Entity\Entity.php(577): XF\Mvc\Entity\Entity->set('country', NULL) #5 src\addons\DigitalPoint\Security\Repository\UserExtra.php(19): XF\Mvc\Entity\Entity->__set('country', NULL) #6 src\addons\DigitalPoint\Security\XF\Entity\UserRemember.php(30): DigitalPoint\Security\Repository\UserExtra->logExtra(42, 'user_remember') #7 src\addons\DigitalPoint\Security\XF\Entity\UserRemember.php(23): DigitalPoint\Security\XF\Entity\UserRemember->logExtra() #8 src\XF\Mvc\Entity\Entity.php(1277): DigitalPoint\Security\XF\Entity\UserRemember->_postSave() #9 src\XF\Repository\UserRemember.php(17): XF\Mvc\Entity\Entity->save() #10 src\XF\ControllerPlugin\Login.php(282): XF\Repository\UserRemember->createRememberRecord(1) #11 src\XF\ControllerPlugin\Login.php(219): XF\ControllerPlugin\Login->createVisitorRememberKey() #12 src\XF\Pub\Controller\Login.php(125): XF\ControllerPlugin\Login->completeLogin(Object(XenAddons\LD\XF\Entity\User), true) #13 src\XF\Mvc\Dispatcher.php(352): XF\Pub\Controller\Login->actionLogin(Object(XF\Mvc\ParameterBag)) #14 src\XF\Mvc\Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Login', 'Login', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Login), NULL) #15 src\XF\Mvc\Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Login), NULL) #16 src\XF\Mvc\Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #17 src\XF\App.php(2483): XF\Mvc\Dispatcher->run() #18 src\XF.php(524): XF\App->run() #19 index.php(20): XF::runApp('XF\\Pub\\App') #20 {main}
Deactivate then activate the add-on solved the problem.Code:array(4) { ["url"] => string(27) "/test/index.php?login/login" ["referrer"] => string(32) "https://localhost/test/index.php" ["_GET"] => array(1) { ["login/login"] => string(0) "" } ["_POST"] => array(5) { ["_xfToken"] => string(8) "********" ["login"] => string(7) "Nicolas" ["password"] => string(8) "********" ["remember"] => string(1) "1" ["_xfRedirect"] => string(32) "https://localhost/test/index.php" } }
'default' => null
'default' => ''
That poses another question....I know IP data is easily accessible with an Admin account, is this other data accessible as well in the ACP?It wouldn't be terribly hard, but going out of your way to take away user's ability to manage their own sessions might not be the best idea. Pretty much every major website allows users to see their session data so they can see if there are any that are unexpected. For example...
We use essential cookies to make this site work, and optional cookies to enhance your experience.