auth block error
Permalink Browser Info Environment
/home1/diedesig/addscustomer.diedesignsoftware.com/packages/kalmoya_two_step_authentication_advanced/elements/authenticator/core/user_settings_form.php
}
if (is_array($submitted)) {
extract($submitted);
}
$passString = t("You have no Emergency Passwords left");
if (!empty($password) && $actionType === 'edit') {
$passArray = json_decode($password);
if (is_array($passArray)) {
$passCount = count($passArray) - 1;
if ($passCount > 0) {
$passString = t2("You only have %s Emergency Password left", "You still have %s Emergency Passwords left", $passCount);
}
}
}
$password = !empty($password) && $actionType === 'edit' ? 'XXXX XXXX XXXX XXXX' : $password;
$authSettings = $authenticator->getSettings();
if (is_array($authSettings)) {
extract($authSettings);
}
if (!empty($userEncryptionLevel)) {
$userEncryptionLevel = strtoupper($userEncryptionLevel);
}
if (!empty($encryption_level)) {
$encryption_level = strtoupper($encryption_level);
}
// if user NOT already using an existing encryption type (SHA1, SHA256 or SHA 512) we use the one defined in the Authenticator's settings
if (empty($userEncryptionLevel) || !defined("\PragmaRX\Google2FA\Support\Constants::" . $userEncryptionLevel)) {
$userEncryptionLevel = false;
} else {
// $userEncryptionLevel = constant("\PragmaRX\Google2FA\Support\Constants::" . $userEncryptionLevel);
}
Arguments
"Undefined variable $password"
--------------------------
I uninstalled the package to get rid of the error.
On reinstall the error is gone since I dont have it config'ed yet.
}
if (is_array($submitted)) {
extract($submitted);
}
$passString = t("You have no Emergency Passwords left");
if (!empty($password) && $actionType === 'edit') {
$passArray = json_decode($password);
if (is_array($passArray)) {
$passCount = count($passArray) - 1;
if ($passCount > 0) {
$passString = t2("You only have %s Emergency Password left", "You still have %s Emergency Passwords left", $passCount);
}
}
}
$password = !empty($password) && $actionType === 'edit' ? 'XXXX XXXX XXXX XXXX' : $password;
$authSettings = $authenticator->getSettings();
if (is_array($authSettings)) {
extract($authSettings);
}
if (!empty($userEncryptionLevel)) {
$userEncryptionLevel = strtoupper($userEncryptionLevel);
}
if (!empty($encryption_level)) {
$encryption_level = strtoupper($encryption_level);
}
// if user NOT already using an existing encryption type (SHA1, SHA256 or SHA 512) we use the one defined in the Authenticator's settings
if (empty($userEncryptionLevel) || !defined("\PragmaRX\Google2FA\Support\Constants::" . $userEncryptionLevel)) {
$userEncryptionLevel = false;
} else {
// $userEncryptionLevel = constant("\PragmaRX\Google2FA\Support\Constants::" . $userEncryptionLevel);
}
Arguments
"Undefined variable $password"
--------------------------
I uninstalled the package to get rid of the error.
On reinstall the error is gone since I dont have it config'ed yet.
Type: | Ticket |
---|---|
Status: | Resolved |
And logged out:
/home1/diedesig/addscustomer.diedesignsoftware.com/packages/kalmoya_two_step_authentication_advanced/blocks/two_step_authentication_advanced/controller.php
$authID = $authenticator->getAuthenticatorID();
}
$hasAuthenticators = $this->loadAuthenticatorsAndAssets($authID);
// 'submitted' => $submitted,
// 'userEntity' => $userEntity,
$this->set('buID', $this->getBlockUID());
$this->set('page', Page::getCurrentPage());
$this->set('app', $this->app);
$this->set('token', $this->app->make('token'));
$this->set('settings', $settings);
$this->set('userSettings', $userSettings);
$this->set('coreUser', $coreUser);
$this->set('coreUserEntity', $coreUserEntity);
$this->set('authenticatorSelectList', $authenticatorSelectList);
$this->set('authenticators', $authenticators);
$this->set('activeAuthDisabled', $activeAuthDisabled);
$this->set('activeAuthName', $activeAuthName);
$this->set('activeAuthID', $activeAuthID);
$this->set('authenticator', $activeAuth);
$this->set('authenticator', $authenticator);
$this->set('authID', $authID);
$this->set('curAuthName', $curAuthName);
}
public function action_auth_success($bID = null, $hasAuth = null)
{
if ($this->bID == $bID) {
if ($hasAuth) {
$msg = t("Next time you log in to your account you'll go through 2 authentication steps.");
} else {
$msg = t("Your second step authenticator has been disabled.");
}
$this->set('success', t("Your settings were saved successfuly. %s", $msg));
}
Arguments
"Undefined variable $activeAuthDisabled"
/home1/diedesig/addscustomer.diedesignsoftware.com/packages/kalmoya_two_step_authentication_advanced/blocks/two_step_authentication_advanced/controller.php
$authID = $authenticator->getAuthenticatorID();
}
$hasAuthenticators = $this->loadAuthenticatorsAndAssets($authID);
// 'submitted' => $submitted,
// 'userEntity' => $userEntity,
$this->set('buID', $this->getBlockUID());
$this->set('page', Page::getCurrentPage());
$this->set('app', $this->app);
$this->set('token', $this->app->make('token'));
$this->set('settings', $settings);
$this->set('userSettings', $userSettings);
$this->set('coreUser', $coreUser);
$this->set('coreUserEntity', $coreUserEntity);
$this->set('authenticatorSelectList', $authenticatorSelectList);
$this->set('authenticators', $authenticators);
$this->set('activeAuthDisabled', $activeAuthDisabled);
$this->set('activeAuthName', $activeAuthName);
$this->set('activeAuthID', $activeAuthID);
$this->set('authenticator', $activeAuth);
$this->set('authenticator', $authenticator);
$this->set('authID', $authID);
$this->set('curAuthName', $curAuthName);
}
public function action_auth_success($bID = null, $hasAuth = null)
{
if ($this->bID == $bID) {
if ($hasAuth) {
$msg = t("Next time you log in to your account you'll go through 2 authentication steps.");
} else {
$msg = t("Your second step authenticator has been disabled.");
}
$this->set('success', t("Your settings were saved successfuly. %s", $msg));
}
Arguments
"Undefined variable $activeAuthDisabled"
Hello. Thank you for bringing this to my attention. I'll have a look and will keep you updated.
Please update to version 1.0.2 that I just uploaded and it should fix the issue.
New error on login once the email link is saved:
/home1/diedesig/addscustomer.diedesignsoftware.com/concrete/src/Form/Service/Form.php
* Creates a hidden form field.
*
* @param string $key the name/id of the element
* @param string $value the value of the element (overriden if we received some data in POST or GET)
* @param array $miscFields additional fields appended to the element (a hash array of attributes name => value), possibly including 'class', 'id', and 'name'
*
* @return string
*/
public function hidden($key, $value = null, $miscFields = [])
{
$name = (string) ($miscFields['name'] ?? $key);
if ($name !== '') {
$requestValue = $this->getRequestValue($name);
if ($requestValue !== false && !is_array($requestValue)) {
$value = $requestValue;
}
}
$nameAndID = $this->buildNameAndID($key, $miscFields);
return '<input type="hidden"' . $nameAndID . $this->serializeMiscFields('', $miscFields) . ' value="' . $value . '" />';
}
/**
* Generates a checkbox.
*
* @param string $key The name/id of the element. It should end with '[]' if it's to return an array on submit.
* @param string | int $value String value sent to server, if checkbox is checked, on submit
* @param string | bool | int $isChecked "Checked" value (subject to be overridden by $_REQUEST). Checkbox is checked if value is true (string). Note that 'false' (string) evaluates to true (boolean)!
* @param array $miscFields additional fields appended to the element (a hash array of attributes name => value), possibly including 'class', 'id', and 'name'
*
* @return string
*/
public function checkbox($key, $value, $isChecked = false, $miscFields = [])
{
$name = (string) ($miscFields['name'] ?? $key);
$_field = $name;
if (substr($_field, -2) == '[]') {
$_field = substr($_field, 0, -2);
}
if (!array_key_exists('id', $miscFields) && substr($key, -2) === '[]') {
Arguments
"Object of class Concrete\Core\User\User could not be converted to string"
===================================
Environment & details:
Concrete CMS
Version
"9.2.1"
Installed Version
"9.2.1"
Database Version
"20230503095900"
PHP
Version
"8.2.8"
Extensions
array:60 [▶]
Concrete Configuration
concrete
array:56 [▶]
app
array:19 [▶]
GET Data empty
POST Data empty
Files empty
Cookies
_ga
"***************************"
_ga_J8LM77L0NC
"*************************************"
dashboardPanelStatus
"****"
CONCRETE
"********************************"
Session
_sf2_attributes
array:2 [▶]
_symfony_flashes
[]
_sf2_meta
array:3 [▶]
Server/Request Data
LSPHP_ENABLE_USER_INI
"**"
PATH
"****************************"
TEMP
"****"
TMP
"****"
TMPDIR
"****"
PWD
"*"
HTTP_ACCEPT
"***************************************************************************************************************************************"
HTTP_ACCEPT_ENCODING
"*****************"
HTTP_ACCEPT_LANGUAGE
"**************"
CONTENT_LENGTH
"*"
HTTP_COOKIE
"***********************************************************************************************************************************************************"
HTTP_HOST
"**********************************"
HTTP_REFERER
"************************************************"
HTTP_USER_AGENT
"*********************************************************************************************************************"
HTTP_CACHE_CONTROL
"*********"
HTTP_DNT
"*"
HTTP_UPGRADE_INSECURE_REQUESTS
"*"
HTTP_SEC_FETCH_SITE
"***********"
HTTP_SEC_FETCH_MODE
"********"
HTTP_SEC_FETCH_USER
"**"
HTTP_SEC_FETCH_DEST
"********"
HTTP_SEC_CH_UA
"****************************************************************"
HTTP_SEC_CH_UA_MOBILE
"**"
HTTP_SEC_CH_UA_PLATFORM
"*******"
HTTP_SEC_GPC
"*"
REDIRECT_UNIQUE_ID
"***************************"
REDIRECT_QS_ConnectionId
"************************"
REDIRECT_HTTPS
"**"
REDIRECT_SSL_TLS_SNI
"**********************************"
REDIRECT_HTTP2
"**"
REDIRECT_H2PUSH
"***"
REDIRECT_H2_PUSH
"***"
REDIRECT_H2_PUSHED
""
REDIRECT_H2_PUSHED_ON
""
REDIRECT_H2_STREAM_ID
"*"
REDIRECT_H2_STREAM_TAG
"************"
REDIRECT_STATUS
"***"
UNIQUE_ID
"***************************"
QS_ConnectionId
"************************"
HTTPS
"**"
SSL_TLS_SNI
"**********************************"
HTTP2
"**"
H2PUSH
"***"
H2_PUSH
"***"
H2_PUSHED
""
H2_PUSHED_ON
""
H2_STREAM_ID
"*"
H2_STREAM_TAG
"************"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"******"
SERVER_NAME
"**********************************"
SERVER_ADDR
"**************"
SERVER_PORT
"***"
REMOTE_ADDR
"*************"
DOCUMENT_ROOT
"**************************************************"
REQUEST_SCHEME
"*****"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"**************************************************"
SERVER_ADMIN
"********************************************"
SCRIPT_FILENAME
"************************************************************"
REMOTE_PORT
"*****"
REDIRECT_URL
"****************************************************************************************************************"
SERVER_PROTOCOL
"********"
REQUEST_METHOD
"***"
QUERY_STRING
""
REQUEST_URI
"********************************************************************************************************************"
SCRIPT_NAME
"**********"
PHP_SELF
"**********"
REQUEST_TIME_FLOAT
"***"
REQUEST_TIME
"***"
argv
"***"
argc
"***"
Environment Variables empty
Registered Handlers
0. Concrete\Core\Error\Handler\ErrorHandler
1. Concrete\Core\Error\Handler\JsonErrorHandler
/home1/diedesig/addscustomer.diedesignsoftware.com/concrete/src/Form/Service/Form.php
* Creates a hidden form field.
*
* @param string $key the name/id of the element
* @param string $value the value of the element (overriden if we received some data in POST or GET)
* @param array $miscFields additional fields appended to the element (a hash array of attributes name => value), possibly including 'class', 'id', and 'name'
*
* @return string
*/
public function hidden($key, $value = null, $miscFields = [])
{
$name = (string) ($miscFields['name'] ?? $key);
if ($name !== '') {
$requestValue = $this->getRequestValue($name);
if ($requestValue !== false && !is_array($requestValue)) {
$value = $requestValue;
}
}
$nameAndID = $this->buildNameAndID($key, $miscFields);
return '<input type="hidden"' . $nameAndID . $this->serializeMiscFields('', $miscFields) . ' value="' . $value . '" />';
}
/**
* Generates a checkbox.
*
* @param string $key The name/id of the element. It should end with '[]' if it's to return an array on submit.
* @param string | int $value String value sent to server, if checkbox is checked, on submit
* @param string | bool | int $isChecked "Checked" value (subject to be overridden by $_REQUEST). Checkbox is checked if value is true (string). Note that 'false' (string) evaluates to true (boolean)!
* @param array $miscFields additional fields appended to the element (a hash array of attributes name => value), possibly including 'class', 'id', and 'name'
*
* @return string
*/
public function checkbox($key, $value, $isChecked = false, $miscFields = [])
{
$name = (string) ($miscFields['name'] ?? $key);
$_field = $name;
if (substr($_field, -2) == '[]') {
$_field = substr($_field, 0, -2);
}
if (!array_key_exists('id', $miscFields) && substr($key, -2) === '[]') {
Arguments
"Object of class Concrete\Core\User\User could not be converted to string"
===================================
Environment & details:
Concrete CMS
Version
"9.2.1"
Installed Version
"9.2.1"
Database Version
"20230503095900"
PHP
Version
"8.2.8"
Extensions
array:60 [▶]
Concrete Configuration
concrete
array:56 [▶]
app
array:19 [▶]
GET Data empty
POST Data empty
Files empty
Cookies
_ga
"***************************"
_ga_J8LM77L0NC
"*************************************"
dashboardPanelStatus
"****"
CONCRETE
"********************************"
Session
_sf2_attributes
array:2 [▶]
_symfony_flashes
[]
_sf2_meta
array:3 [▶]
Server/Request Data
LSPHP_ENABLE_USER_INI
"**"
PATH
"****************************"
TEMP
"****"
TMP
"****"
TMPDIR
"****"
PWD
"*"
HTTP_ACCEPT
"***************************************************************************************************************************************"
HTTP_ACCEPT_ENCODING
"*****************"
HTTP_ACCEPT_LANGUAGE
"**************"
CONTENT_LENGTH
"*"
HTTP_COOKIE
"***********************************************************************************************************************************************************"
HTTP_HOST
"**********************************"
HTTP_REFERER
"************************************************"
HTTP_USER_AGENT
"*********************************************************************************************************************"
HTTP_CACHE_CONTROL
"*********"
HTTP_DNT
"*"
HTTP_UPGRADE_INSECURE_REQUESTS
"*"
HTTP_SEC_FETCH_SITE
"***********"
HTTP_SEC_FETCH_MODE
"********"
HTTP_SEC_FETCH_USER
"**"
HTTP_SEC_FETCH_DEST
"********"
HTTP_SEC_CH_UA
"****************************************************************"
HTTP_SEC_CH_UA_MOBILE
"**"
HTTP_SEC_CH_UA_PLATFORM
"*******"
HTTP_SEC_GPC
"*"
REDIRECT_UNIQUE_ID
"***************************"
REDIRECT_QS_ConnectionId
"************************"
REDIRECT_HTTPS
"**"
REDIRECT_SSL_TLS_SNI
"**********************************"
REDIRECT_HTTP2
"**"
REDIRECT_H2PUSH
"***"
REDIRECT_H2_PUSH
"***"
REDIRECT_H2_PUSHED
""
REDIRECT_H2_PUSHED_ON
""
REDIRECT_H2_STREAM_ID
"*"
REDIRECT_H2_STREAM_TAG
"************"
REDIRECT_STATUS
"***"
UNIQUE_ID
"***************************"
QS_ConnectionId
"************************"
HTTPS
"**"
SSL_TLS_SNI
"**********************************"
HTTP2
"**"
H2PUSH
"***"
H2_PUSH
"***"
H2_PUSHED
""
H2_PUSHED_ON
""
H2_STREAM_ID
"*"
H2_STREAM_TAG
"************"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"******"
SERVER_NAME
"**********************************"
SERVER_ADDR
"**************"
SERVER_PORT
"***"
REMOTE_ADDR
"*************"
DOCUMENT_ROOT
"**************************************************"
REQUEST_SCHEME
"*****"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"**************************************************"
SERVER_ADMIN
"********************************************"
SCRIPT_FILENAME
"************************************************************"
REMOTE_PORT
"*****"
REDIRECT_URL
"****************************************************************************************************************"
SERVER_PROTOCOL
"********"
REQUEST_METHOD
"***"
QUERY_STRING
""
REQUEST_URI
"********************************************************************************************************************"
SCRIPT_NAME
"**********"
PHP_SELF
"**********"
REQUEST_TIME_FLOAT
"***"
REQUEST_TIME
"***"
argv
"***"
argc
"***"
Environment Variables empty
Registered Handlers
0. Concrete\Core\Error\Handler\ErrorHandler
1. Concrete\Core\Error\Handler\JsonErrorHandler
Hello,
The error you are showing comes from Concrete's form generator. It doesn't show anything about my package. I would need the full stack to know what's happening.
The error you are showing comes from Concrete's form generator. It doesn't show anything about my package. I would need the full stack to know what's happening.
I had that on the super admin so I've had to reinstall.
had the email me a code function working.
Now I have this.
I think its your block.
=======================
/home1/diedesig/addscustomer.diedesignsoftware.com/packages/kalmoya_two_step_authentication_advanced/authentication/concrete/two_step_authentication_advanced.php
<?php defined('C5_EXECUTE') or die('Access denied.');
use Concrete\Package\KalmoyaTwoStepAuthenticationAdvanced\TwoStepAuthenticator\RequiredLoginFormInputs;
use Concrete\Core\Foundation\Environment;
use Concrete\Core\View\View;
use Concrete\Core\Url\Resolver\Manager\ResolverManagerInterface;
use Concrete\Core\Support\Facade\Application;
use Kalmoya\TwoStepAdvanced\Utilities\Reusable;
$app = Application::getFacadeApplication();
$urlResolver = $app->make(ResolverManagerInterface::class);
$requiredFields = new RequiredLoginFormInputs(['authenticationTypeHandle' => $this->getAuthenticationTypeHandle(), 'nonce' => $nonce, 'user' => $user, 'uMaintainLogin' => $uMaintainLogin]);
$params = [
'authenticationTypeHandle' => $this->getAuthenticationTypeHandle(),
'authenticator' => $authenticator,
'app' => $app,
'urlResolver' => $urlResolver,
];
$env = Environment::get();
$elementPath = implode('/', ['authenticator', $authHandle, 'login_form']);
$overrideElementRecord = $env->getRecord(DIRNAME_ELEMENTS . '/' . $elementPath . '.php');
?>
<form method="post" action="<?php echo $urlResolver->resolve(['/login', ['authenticate', $this->getAuthenticationTypeHandle()]]); ?>">
<?php
echo $requiredFields;
if ($overrideElementRecord->override) {
View::element($elementPath, $params);
} else {
View::element($elementPath, $params, $pkgHandle);
}
?>
</form>
<?php
if ($authRecoveryStrategy != "none") {
View::element(
"authenticator/recovery",
Arguments
"Method Concrete\Package\KalmoyaTwoStepAuthenticationAdvanced\TwoStepAuthenticator\RequiredLoginFormInputs::__toString() must not throw an exception, caught Whoo ▶"
=============================
Concrete CMS
Version
"9.2.1"
Installed Version
"9.2.1"
Database Version
"20230503095900"
PHP
Version
"7.3.33"
=====================
this is the ONLY addon I have installed.
I can't get to the environment cause Im locked out.
had the email me a code function working.
Now I have this.
I think its your block.
=======================
/home1/diedesig/addscustomer.diedesignsoftware.com/packages/kalmoya_two_step_authentication_advanced/authentication/concrete/two_step_authentication_advanced.php
<?php defined('C5_EXECUTE') or die('Access denied.');
use Concrete\Package\KalmoyaTwoStepAuthenticationAdvanced\TwoStepAuthenticator\RequiredLoginFormInputs;
use Concrete\Core\Foundation\Environment;
use Concrete\Core\View\View;
use Concrete\Core\Url\Resolver\Manager\ResolverManagerInterface;
use Concrete\Core\Support\Facade\Application;
use Kalmoya\TwoStepAdvanced\Utilities\Reusable;
$app = Application::getFacadeApplication();
$urlResolver = $app->make(ResolverManagerInterface::class);
$requiredFields = new RequiredLoginFormInputs(['authenticationTypeHandle' => $this->getAuthenticationTypeHandle(), 'nonce' => $nonce, 'user' => $user, 'uMaintainLogin' => $uMaintainLogin]);
$params = [
'authenticationTypeHandle' => $this->getAuthenticationTypeHandle(),
'authenticator' => $authenticator,
'app' => $app,
'urlResolver' => $urlResolver,
];
$env = Environment::get();
$elementPath = implode('/', ['authenticator', $authHandle, 'login_form']);
$overrideElementRecord = $env->getRecord(DIRNAME_ELEMENTS . '/' . $elementPath . '.php');
?>
<form method="post" action="<?php echo $urlResolver->resolve(['/login', ['authenticate', $this->getAuthenticationTypeHandle()]]); ?>">
<?php
echo $requiredFields;
if ($overrideElementRecord->override) {
View::element($elementPath, $params);
} else {
View::element($elementPath, $params, $pkgHandle);
}
?>
</form>
<?php
if ($authRecoveryStrategy != "none") {
View::element(
"authenticator/recovery",
Arguments
"Method Concrete\Package\KalmoyaTwoStepAuthenticationAdvanced\TwoStepAuthenticator\RequiredLoginFormInputs::__toString() must not throw an exception, caught Whoo ▶"
=============================
Concrete CMS
Version
"9.2.1"
Installed Version
"9.2.1"
Database Version
"20230503095900"
PHP
Version
"7.3.33"
=====================
this is the ONLY addon I have installed.
I can't get to the environment cause Im locked out.
also i have the site available to registered users only. (and admins)
WAIT: that last atempt with the error DID send me a clickable link and am logged in!
++++++++++++++++++++++++++++++
# Concrete Version
Core Version - 9.2.1
Version Installed - 9.2.1
Database Version - 20230503095900
# Hostname
box2271.bluehost.com
# Environment
production
# Database Information
Version: 5.7.23-23
SQL Mode: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# Concrete Packages
Two-Step Authentication Advanced (1.0.2)
# Concrete Overrides
None
# Concrete Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache
# Server API
litespeed
# PHP Version
7.3.33
yada yada .....
++++++++++++++++++++++++++++++
# Concrete Version
Core Version - 9.2.1
Version Installed - 9.2.1
Database Version - 20230503095900
# Hostname
box2271.bluehost.com
# Environment
production
# Database Information
Version: 5.7.23-23
SQL Mode: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# Concrete Packages
Two-Step Authentication Advanced (1.0.2)
# Concrete Overrides
None
# Concrete Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache
# Server API
litespeed
# PHP Version
7.3.33
yada yada .....
OK I'm looking into it.
Concrete's latest version made a change that broke the package. I fixed it. I uploaded version 1.0.3. Please upload and it should work.
Advance permissions are on.