Skip to content

Commit

Permalink
Merge branch '4.2-dev' of https://github.com/joomla/joomla-cms into 4…
Browse files Browse the repository at this point in the history
….3-dev
  • Loading branch information
Hackwar committed Aug 8, 2022
2 parents dddf7c7 + 7cf5e12 commit 6590d1d
Show file tree
Hide file tree
Showing 25 changed files with 135 additions and 65 deletions.
2 changes: 1 addition & 1 deletion administrator/components/com_admin/tmpl/help/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="sidebar-nav" id="help-index">
<ul class="nav flex-column">
<li class="item"><?php echo HTMLHelper::_('link', Help::createUrl('Start_Here'), Text::_('COM_ADMIN_START_HERE'), ['target' => 'helpFrame']); ?></li>
<li class="item"><?php echo HTMLHelper::_('link', 'https://www.gnu.org/licenses/gpl-2.0.html', Text::_('COM_ADMIN_LICENSE'), ['target' => 'helpFrame']); ?></li>
<li class="item"><?php echo HTMLHelper::_('link', 'https://help.joomla.org/proxy?keyref=Help4.x:License', Text::_('COM_ADMIN_LICENSE'), ['target' => 'helpFrame']); ?></li>
<li class="item"><?php echo HTMLHelper::_('link', Help::createUrl('Glossary'), Text::_('COM_ADMIN_GLOSSARY'), ['target' => 'helpFrame']); ?></li>
<li class="divider"></li>
<li class="nav-header"><?php echo Text::_('COM_ADMIN_ALPHABETICAL_INDEX'); ?></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
</td>
</tr>
<?php foreach ($value->value as $subName => $subValue) : ?>
<?php if ($subValue) : ?>
<?php if ($subValue && isset($subValue->value)) : ?>
<?php $subValue->value = (\is_object($subValue->value) || \is_array($subValue->value)) ? \json_encode($subValue->value, \JSON_UNESCAPED_UNICODE) : $subValue->value; ?>
<tr>
<th scope="row"><em>&nbsp;&nbsp;<?php echo $subValue->label; ?></em></th>
<td><?php echo $subValue->value; ?></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function display($tpl = null)
$language->load('com_installer', JPATH_ADMINISTRATOR, 'en-GB', false, true);
$language->load('com_installer', JPATH_ADMINISTRATOR, null, true);

Factory::getApplication()->enqueueMessage(Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'notice');
Factory::getApplication()->enqueueMessage(Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'warning');
}

$params = ComponentHelper::getParams('com_joomlaupdate');
Expand Down
14 changes: 7 additions & 7 deletions administrator/components/com_media/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<field
name="restrict_uploads_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_DESC"
default="bmp,gif,jpg,jpeg,png,webp,ico,mp3,mp4,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,csv"
Expand All @@ -73,46 +73,46 @@

<field
name="image_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_DESC"
default="bmp,gif,jpg,jpeg,png,webp"
/>

<field
name="audio_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_LEGAL_AUDIO_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_LEGAL_AUDIO_EXTENSIONS_DESC"
default="mp3,m4a,mp4a,ogg"
/>

<field
name="video_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_LEGAL_VIDEO_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_LEGAL_VIDEO_EXTENSIONS_DESC"
default="mp4,mp4v,mpeg,mov,webm"
/>

<field
name="doc_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_LEGAL_DOCUMENT_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_LEGAL_DOCUMENT_EXTENSIONS_DESC"
default="doc,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv"
/>

<field
name="ignore_extensions"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_IGNORED_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_IGNORED_EXTENSIONS_DESC"
/>

<field
name="upload_mime"
type="text"
type="textarea"
label="COM_MEDIA_FIELD_LEGAL_MIME_TYPES_LABEL"
description="COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC"
default="image/jpeg,image/gif,image/png,image/bmp,image/webp,audio/ogg,audio/mpeg,audio/mp4,video/mp4,video/mpeg,video/quicktime,video/webm,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip"
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_media/tmpl/file/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
'csrfToken' => Session::getFormToken(),
'uploadPath' => $this->file->path,
'editViewUrl' => Uri::base() . 'index.php?option=com_media&view=file' . ($tmpl ? '&tmpl=' . $tmpl : '') . '&mediatypes=' . $mediaTypes,
'imagesExtensions' => explode(',', $params->get('image_extensions', 'bmp,gif,jpg,jpeg,png,webp')),
'audioExtensions' => explode(',', $params->get('audio_extensions', 'mp3,m4a,mp4a,ogg')),
'videoExtensions' => explode(',', $params->get('video_extensions', 'mp4,mp4v,mpeg,mov,webm')),
'documentExtensions' => explode(',', $params->get('doc_extensions', 'doc,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv')),
'imagesExtensions' => array_map('trim', explode(',', $params->get('image_extensions', 'bmp,gif,jpg,jpeg,png,webp'))),
'audioExtensions' => array_map('trim', explode(',', $params->get('audio_extensions', 'mp3,m4a,mp4a,ogg'))),
'videoExtensions' => array_map('trim', explode(',', $params->get('video_extensions', 'mp4,mp4v,mpeg,mov,webm'))),
'documentExtensions' => array_map('trim', explode(',', $params->get('doc_extensions', 'doc,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv'))),
'maxUploadSizeMb' => $params->get('upload_maxsize', 10),
'contents' => $this->file->content,
];
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_media/tmpl/media/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
'fileBaseUrl' => Uri::root() . $params->get('file_path', 'images'),
'fileBaseRelativeUrl' => $params->get('file_path', 'images'),
'editViewUrl' => Uri::base() . 'index.php?option=com_media&view=file' . ($tmpl ? '&tmpl=' . $tmpl : '') . $mediaTypes,
'imagesExtensions' => explode(',', $params->get('image_extensions', 'bmp,gif,jpg,jpeg,png,webp')),
'audioExtensions' => explode(',', $params->get('audio_extensions', 'mp3,m4a,mp4a,ogg')),
'videoExtensions' => explode(',', $params->get('video_extensions', 'mp4,mp4v,mpeg,mov,webm')),
'documentExtensions' => explode(',', $params->get('doc_extensions', 'doc,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv')),
'imagesExtensions' => array_map('trim', explode(',', $params->get('image_extensions', 'bmp,gif,jpg,jpeg,png,webp'))),
'audioExtensions' => array_map('trim', explode(',', $params->get('audio_extensions', 'mp3,m4a,mp4a,ogg'))),
'videoExtensions' => array_map('trim', explode(',', $params->get('video_extensions', 'mp4,mp4v,mpeg,mov,webm'))),
'documentExtensions' => array_map('trim', explode(',', $params->get('doc_extensions', 'doc,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv'))),
'maxUploadSizeMb' => $params->get('upload_maxsize', 10),
'providers' => (array) $this->providers,
'currentPath' => $this->currentPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null)
{
$app = Factory::getApplication();
$this->file = $app->input->get('file');
$this->file = $app->input->get('file', '');
$this->fileName = InputFilter::getInstance()->clean(base64_decode($this->file), 'string');
$explodeArray = explode('.', $this->fileName);
$ext = end($explodeArray);
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_users/tmpl/methods/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class="img-fluid"
<div class="com-users-methods-list-method-record d-flex flex-row flex-wrap justify-content-start border-top py-2">
<div class="com-users-methods-list-method-record-info flex-grow-1 d-flex flex-column align-items-start gap-1">
<?php if ($methodName === 'backupcodes') : ?>
<div class="alert alert-info mt-1 w-100">
<?php if ($canAddEdit) : ?>
<?php if ($canAddEdit) : ?>
<div class="alert alert-info mt-1 w-100">
<?php echo Text::sprintf('COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD', Route::_('index.php?option=com_users&task=method.edit&id=' . (int) $record->id . ($this->returnURL ? '&returnurl=' . $this->escape(urlencode($this->returnURL)) : '') . '&user_id=' . $this->user->id)) ?>
<?php endif ?>
</div>
</div>
<?php endif ?>
<?php else : ?>
<h4 class="com-users-methods-list-method-record-title-container mb-1 fs-3">
<?php if ($record->default) : ?>
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/plg_multifactorauth_yubikey.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PLG_MULTIFACTORAUTH_YUBIKEY_CAPTIVE_PROMPT="Please click in the text box below.
PLG_MULTIFACTORAUTH_YUBIKEY_CODE_LABEL="YubiKey code"
PLG_MULTIFACTORAUTH_YUBIKEY_ERR_VALIDATIONFAILED="You did not enter a valid YubiKey secret code or the YubiCloud servers are unreachable at this time."
PLG_MULTIFACTORAUTH_YUBIKEY_LBL_AFTERSETUP_INSTRUCTIONS="You have already set up your YubiKey (the one generating codes starting with <code>%s</code>). You can only change its title from this page."
PLG_MULTIFACTORAUTH_YUBIKEY_LBL_SETUP_INSTRUCTIONS="Please provide a code generated by your <a href='https://www.yubico.com/'>YubiKey</a> below and then click or touch the Confirm button. The first twelve characters, which are the unique identification code for your YubiKey, will be saved."
PLG_MULTIFACTORAUTH_YUBIKEY_LBL_SETUP_INSTRUCTIONS="Please provide a code generated by your <a href=\"https://www.yubico.com\" target=\"_blank\" rel=\"noopener noreferrer\">YubiKey</a> below and then click or touch the Confirm button. The first twelve characters, which are the unique identification code for your YubiKey, will be saved."
PLG_MULTIFACTORAUTH_YUBIKEY_LBL_SETUP_LABEL="YubiKey Identification"
PLG_MULTIFACTORAUTH_YUBIKEY_LBL_SETUP_PLACEHOLDER="Enter a YubiKey code"
PLG_MULTIFACTORAUTH_YUBIKEY_METHOD_TITLE="YubiKey"
PLG_MULTIFACTORAUTH_YUBIKEY_SHORTINFO="Use YubiKey secure hardware tokens."
PLG_MULTIFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use Multi-factor Authentication using a YubiKey secure hardware token. Users need their own YubiKey available from https://www.yubico.com/. To use Multi-factor Authentication users have to edit their user profile and enable Multi-factor Authentication."
PLG_MULTIFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use Multi-factor Authentication using a YubiKey secure hardware token. Users need their own YubiKey available from <a href=\"https://www.yubico.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.yubico.com</a>. To use Multi-factor Authentication users have to edit their user profile and enable Multi-factor Authentication."
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
; Note : All ini files need to be saved as UTF-8

PLG_MULTIFACTORAUTH_YUBIKEY="Multi-factor Authentication - YubiKey"
PLG_MULTIFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use Multi-factor Authentication using a YubiKey secure hardware token. Users need their own YubiKey available from https://www.yubico.com/. To use Multi-factor Authentication users have to edit their user profile and enable Multi-factor Authentication."
PLG_MULTIFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use Multi-factor Authentication using a YubiKey secure hardware token. Users need their own YubiKey available from <a href=\"https://www.yubico.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.yubico.com</a>. To use Multi-factor Authentication users have to edit their user profile and enable Multi-factor Authentication."
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_system_webauthn.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PLG_SYSTEM_WEBAUTHN_ERR_EMPTY_USERNAME="You need to enter your username (but NOT
PLG_SYSTEM_WEBAUTHN_ERR_INVALID_USERNAME="The specified username does not correspond to a user account that has enabled passwordless login on this site."
PLG_SYSTEM_WEBAUTHN_ERR_LABEL_NOT_SAVED="Could not save the new label"
PLG_SYSTEM_WEBAUTHN_ERR_NOT_DELETED="Could not remove the authenticator"
PLG_SYSTEM_WEBAUTHN_ERR_NOUSER="No user account has been found"
PLG_SYSTEM_WEBAUTHN_ERR_NO_BROWSER_SUPPORT="Sorry, your browser does not support the W3C Web Authentication standard for passwordless logins or your site is not being served over HTTPS with a valid certificate, signed by a Certificate Authority your browser trusts. You will need to log into this site using your username and password."
PLG_SYSTEM_WEBAUTHN_ERR_NO_STORED_CREDENTIAL="Cannot find the stored credentials for your login authenticator."
PLG_SYSTEM_WEBAUTHN_ERR_USER_REMOVED="The user for this authenticator seems to no longer exist on this site."
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/plg_twofactorauth_yubikey.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ PLG_TWOFACTORAUTH_YUBIKEY_SECTION_SITE="Site (Frontend)"
PLG_TWOFACTORAUTH_YUBIKEY_SECURITYCODE="Security Code"
PLG_TWOFACTORAUTH_YUBIKEY_STEP1_HEAD="Set up"
PLG_TWOFACTORAUTH_YUBIKEY_STEP1_TEXT="Please insert your YubiKey device into your computer's USB port. Select the Security Code field below. Then touch the gold disk on your YubiKey device for one second. Afterwards, please save your user profile. If the code generated by your YubiKey is validated by YubiCloud the Two Factor Authentication feature will be enabled and this YubiKey will be linked with your user account."
PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own YubiKey available from https://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication."
PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own YubiKey available from <a href=\"https://www.yubico.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.yubico.com</a>. To use two factor authentication users have to edit their user profile and enable two factor authentication."
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
; Obsolete since 4.2.0 -- The entire file must be removed in Joomla 5.0

PLG_TWOFACTORAUTH_YUBIKEY="Two Factor Authentication - YubiKey"
PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own YubiKey available from https://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication."
PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own YubiKey available from <a href=\"https://www.yubico.com\" target=\"_blank\" rel=\"noopener noreferrer\">www.yubico.com</a>. To use two factor authentication users have to edit their user profile and enable two factor authentication."
3 changes: 1 addition & 2 deletions administrator/modules/mod_quickicon/mod_quickicon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
<description>MOD_QUICKICON_XML_DESCRIPTION</description>
<namespace path="src">Joomla\Module\Quickicon</namespace>
<files>
<filename module="mod_quickicon">mod_quickicon.php</filename>
<folder>services</folder>
<folder module="mod_quickicon">services</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,7 @@
@include border-end-radius(0);
}
}

.dropdown-menu {
text-align: right; // Bootstrap uses left instead of logical properties for this
}
22 changes: 18 additions & 4 deletions components/com_users/src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ public function login()

// Check for a simple menu item id
if (is_numeric($data['return'])) {
$language = $this->getModel('Login', 'Site')->getMenuLanguage($data['return']);
$data['return'] = 'index.php?Itemid=' . $data['return'] . ($language !== '*' ? '&lang=' . $language : '');
$data['return'] = 'index.php?Itemid=' . $data['return'];

if (Multilanguage::isEnabled()) {
$language = $this->getModel('Login', 'Site')->getMenuLanguage($data['return']);

if ($language !== '*') {
$data['return'] .= '&lang=' . $language;
}
}
} elseif (!Uri::isInternal($data['return'])) {
// Don't redirect to an external URL.
$data['return'] = '';
Expand Down Expand Up @@ -128,8 +135,15 @@ public function logout()

// Check for a simple menu item id
if (is_numeric($return)) {
$language = $this->getModel('Login', 'Site')->getMenuLanguage($return);
$return = 'index.php?Itemid=' . $return . ($language !== '*' ? '&lang=' . $language : '');
$return = 'index.php?Itemid=' . $return;

if (Multilanguage::isEnabled()) {
$language = $this->getModel('Login', 'Site')->getMenuLanguage($return);

if ($language !== '*') {
$return .= '&lang=' . $language;
}
}
} elseif (!Uri::isInternal($return)) {
$return = '';
}
Expand Down
4 changes: 2 additions & 2 deletions components/com_users/tmpl/login/default_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<?php endif; ?>

<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?>
<div class="com-users-login__description login-description">
<?php endif; ?>

Expand All @@ -45,7 +45,7 @@
<?php echo HTMLHelper::_('image', $this->params->get('login_image'), empty($this->params->get('login_image_alt')) && empty($this->params->get('login_image_alt_empty')) ? false : $this->params->get('login_image_alt'), ['class' => 'com-users-login__image login-image']); ?>
<?php endif; ?>

<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description', '')) != '') || $this->params->get('login_image') != '') : ?>
</div>
<?php endif; ?>

Expand Down
8 changes: 4 additions & 4 deletions components/com_users/tmpl/methods/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class="img-fluid"
<div class="com-users-methods-list-method-record d-flex flex-row flex-wrap justify-content-start border-top py-2">
<div class="com-users-methods-list-method-record-info flex-grow-1 d-flex flex-column align-items-start gap-1">
<?php if ($methodName === 'backupcodes') : ?>
<div class="alert alert-info mt-1 w-100">
<?php if ($canAddEdit) : ?>
<?php if ($canAddEdit) : ?>
<div class="alert alert-info mt-1 w-100">
<?php echo Text::sprintf('COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD', Route::_('index.php?option=com_users&task=method.edit&id=' . (int) $record->id . ($this->returnURL ? '&returnurl=' . $this->escape(urlencode($this->returnURL)) : '') . '&user_id=' . $this->user->id)) ?>
<?php endif ?>
</div>
</div>
<?php endif ?>
<?php else : ?>
<h3 class="com-users-methods-list-method-record-title-container mb-1 fs-5">
<?php if ($record->default) : ?>
Expand Down
2 changes: 1 addition & 1 deletion layouts/plugins/system/webauthn/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<?php
if (empty($credentials)) : ?>
<tr>
<td colspan="2">
<td colspan="<?php echo $attestationSupport ? '3' : '2'; ?>">
<?php echo Text::_('PLG_SYSTEM_WEBAUTHN_MANAGE_HEADER_NOMETHODS_LABEL') ?>
</td>
</tr>
Expand Down

0 comments on commit 6590d1d

Please sign in to comment.