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.

Type: Ticket
Status: Resolved
tallacman
View Replies:
tallacman replied on at Permalink Reply 1 Attachment
tallacman
does this help? I get this with F2A activated and block added to page.

Advance permissions are on.
tallacman replied on at Permalink Reply
tallacman
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"
mnakalay replied on at Permalink Reply
mnakalay
Hello. Thank you for bringing this to my attention. I'll have a look and will keep you updated.
mnakalay replied on at Permalink Reply
mnakalay
Please update to version 1.0.2 that I just uploaded and it should fix the issue.
tallacman replied on at Permalink Reply
tallacman
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
mnakalay replied on at Permalink Reply
mnakalay
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.
tallacman replied on at Permalink Reply
tallacman
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.
tallacman replied on at Permalink Reply
tallacman
also i have the site available to registered users only. (and admins)
tallacman replied on at Permalink Reply
tallacman
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 .....
tallacman replied on at Permalink Reply
tallacman
mnakalay replied on at Permalink Reply
mnakalay
OK I'm looking into it.
mnakalay replied on at Permalink Reply
mnakalay
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.

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.0
Version Installed - 9.2.0
Database Version - 20230308163514

# Hostname
box2271.bluehost.com

# Environment
production

# Database Information
Version: 5.7.23-23
SQL Mode: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
None

# 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
8.2.7

# PHP Extensions
apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, libxml, litespeed, mbstring, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, readline, Reflection, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 60
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
max_multipart_body_parts - -1
memory_limit - 512M
post_max_size - 516M
upload_max_filesize - 512M
zend.exception_string_param_max_len - 15
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - no value
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.