...
 
Commits (65)
#ddev-generated: Automatically generated ddev .gitignore.
# You can remove the above line if you want to edit and maintain this file yourself.
/commands/*/*.example
/commands/*/README.txt
/homeadditions/*.example
/homeadditions/README.txt
/import.yaml
/docker-compose.yaml
/db_snapshots
......@@ -8,6 +12,10 @@
/import-db
/.bgsync*
/config.*.y*ml
/.webImageExtra
/.dbImageExtra
/.webimageBuild
/.dbimageBuild
/.bgsyncimageBuild
/.sshimageBuild
/.webimageExtra
/.dbimageExtra
/*-build/Dockerfile.example
#!/bin/bash
## #ddev-generated
## Description: run mysql client in db container
## Usage: mysql [flags] [args]
## Example: "ddev mysql" or "ddev mysql -uroot -proot" or "echo 'SHOW TABLES;' | ddev mysql"
## `ddev mysql --database=mysql -uroot -proot` gets you to the 'mysql' database with root privileges
mysql -udb -pdb $@
APIVersion: v1.8.0
APIVersion: v1.11.2
name: my.typo3.org
type: typo3
docroot: public
php_version: "7.2"
webserver_type: nginx-fpm
dbimage: drud/ddev-dbserver:v1.8.0-10.1
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
......@@ -15,23 +14,22 @@ nfs_mount_enabled: false
provider: default
hooks:
post-start:
- exec: bash -c "sudo -E apt-get update"
- exec: bash -c "sudo -E apt-get install --yes --no-install-recommends apt-utils"
- exec: bash -c "sudo -E apt-get install --yes php7.2-ldap -o Dpkg::Options::=\"--force-confdef\"
-o Dpkg::Options::=\"--force-confold\" && killall -HUP php-fpm"
- exec: cp private/typo3conf/AdditionalConfiguration.ddev.php private/typo3conf/AdditionalConfiguration.php
- exec: composer install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build run-script build
- exec: vendor/bin/typo3cms install:generatepackagestates
- exec: vendor/bin/typo3cms install:extensionsetupifpossible
webimage_extra_packages: [php7.2-ldap]
use_dns_when_possible: true
timezone: Europe/Berlin
# This config.yaml was created with ddev version v1.8.0
# webimage: drud/ddev-webserver:v1.8.0
# dbimage: drud/ddev-dbserver:v1.8.0-10.2
# dbaimage: drud/phpmyadmin:v1.8.0
# bgsyncimage: drud/ddev-bgsync:v1.8.0
# This config.yaml was created with ddev version v1.11.2
# webimage: drud/ddev-webserver:v1.11.0
# dbimage: drud/ddev-dbserver:v1.11.0-10.2
# dbaimage: drud/phpmyadmin:v1.11.0
# bgsyncimage: drud/ddev-bgsync:v1.11.0
# However we do not recommend explicitly wiring these images into the
# config.yaml as they may break future versions of ddev.
# You can update this config.yaml using 'ddev config'.
......@@ -39,13 +37,13 @@ hooks:
# Key features of ddev's config.yaml:
# name: <projectname> # Name of the project, automatically provides
# http://projectname.ddev.local and https://projectname.ddev.local
# http://projectname.ddev.site and https://projectname.ddev.site
# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php
# docroot: <relative_path> # Relative path to the directory containing index.php.
# php_version: "7.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3"
# php_version: "7.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4"
# You can explicitly specify the webimage, dbimage, dbaimage lines but this
# is not recommended, as the images are often closely tied to ddev's' behavior,
......@@ -60,14 +58,23 @@ hooks:
# router_https_port: <port> # Port for https (defaults to 443)
# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev exec enable_xdebug" and "ddev exec disable_xdebug" work better,
# as leaving xdebug enabled all the time is a big performance hit.
# webserver_type: nginx-fpm # Can be set to apache-fpm or apache-cgi as well
# timezone: Europe/Berlin
# This is the timezone used in the containers and by PHP;
# it can be set to any valid timezone,
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# For example Europe/Dublin or MST7MDT
# additional_hostnames:
# - somename
# - someothername
# would provide http and https URLs for "somename.ddev.local"
# and "someothername.ddev.local".
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".
# additional_fqdns:
# - example.com
......@@ -115,18 +122,39 @@ hooks:
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.
# phpmyadmin_port: "1000"
# The PHPMyAdmin port can be changed from the default 8036
# mailhog_port: "1001"
# The MailHog port can be changed from the default 8025
# webimage_extra_packages: [php-yaml, php7.3-ldap]
# Extra Debian packages that are needed in the webimage can be added here
# This is ignored if a free-form .ddev/web-build/Dockerfile is provided
# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here
# This is ignored if a free-form .ddev/db-build/Dockerfile is provided
# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true
# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# If you prefer you can change this to "ddev.local" to preserve
# pre-v1.9 behavior.
# ngrok_args: --subdomain mysite --auth username:pass
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs#http or run "ngrok http -h"
# provider: default # Currently either "default" or "pantheon"
#
# Many ddev commands can be extended to run tasks after the ddev command is
# executed.
# Many ddev commands can be extended to run tasks before or after the
# ddev command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
......
......@@ -4,4 +4,3 @@ services:
web:
environment:
- TYPO3_CONTEXT=Development
- DEBIAN_FRONTEND=noninteractive
/vendor/
/var/
/public/
!/public/humans.txt
/private/
......
......@@ -16,6 +16,10 @@
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/t3olayout.git"
},
{
"type": "vcs",
"url": "https://github.com/in2code-de/userprofile.git"
},
{
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/gitlab_api.git"
......@@ -26,22 +30,21 @@
"issues": "https://git-t3o.typo3.org/t3o/my/issues"
},
"require": {
"typo3/cms-redirects": "^9.5",
"helhum/typo3-console": "^5.0",
"dmitryd/typo3-realurl": "^2.1",
"t3o/t3olayout": "^3.0",
"in2code/femanager": "^4.0",
"in2code/userprofile": "^0.2",
"t3o/t3olayout": "^4.0",
"in2code/femanager": "^5.1",
"sjbr/static-info-tables": "^6.5",
"t3o/gitlab_api": "^1.0",
"gordalina/cachetool": "^3.2",
"gordalina/cachetool": "^4.0",
"t3o/t3omy": "@dev",
"t3o/t3o_slack": "@dev",
"t3o/t3o_ldap": "@dev",
"helhum/typo3-secure-web": "^0.2.8"
"in2code/userprofile": "dev-singleview"
},
"config": {
"platform": {
"php": "7.0.30"
"php": "7.2.11"
}
},
"extra": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
rootPageId: 1
base: 'https://my.typo3.org'
baseVariants:
-
base: 'http://my.typo3.org.ddev.site'
condition: 'applicationContext == "Development"'
-
base: 'https://my-stage.typo3.org'
condition: 'applicationContext == "Testing"'
-
base: 'https://my.typo3.org'
condition: 'applicationContext == "Production"'
languages:
-
title: English
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ''
flag: gb
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=404'
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /fileadmin/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*"
......@@ -9,7 +9,7 @@
"extension"
],
"require": {
"typo3/cms-core": "^8.7"
"typo3/cms-core": "^8.7 || ^9.5"
},
"autoload": {
"psr-4": {
......
......@@ -21,7 +21,7 @@ $EM_CONF[$_EXTKEY] = [
'version' => '0.0.0',
'constraints' => [
'depends' => [
'typo3' => '8.7.0-8.99.99',
'typo3' => '8.7.0',
'php' => '7.0.0-7.99.99',
],
'conflicts' => [],
......
......@@ -42,7 +42,11 @@ class DataHandlerHook
*/
public function processDatamap_afterAllOperations(\TYPO3\CMS\Core\DataHandling\DataHandler $dataHandler)
{
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3o_ldap']);
if (version_compare(TYPO3_version, '9.0', '<')) {
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3o_ldap'] ?? '') ?? [];
} else {
$extensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3o_ldap'] ?? [];
}
$enableLdapPasswordUpdates = (int)$extensionConfiguration['enableLdapPasswordUpdates'];
if ($enableLdapPasswordUpdates === 1) {
......
......@@ -25,24 +25,27 @@ class PasswordHashing
*
* @param string $clearText Cleartext representation of the password
* @param string $algorithm The hashing mechanism
* @param string $salt Optional salt
* @param int $rounds The number of rounds for Crypt Salt
* @return bool|string False on failure or the hashed password as string
*/
public function getPasswordHash($clearText, $algorithm = 'crypt', $salt = 'xy')
public function getPasswordHash($clearText, $algorithm = 'crypt_sha512', $rounds = 5000)
{
$ret = false;
if (trim($clearText) !== '') {
switch ($algorithm) {
case 'sha1':
$passwordHash = sha1($clearText, true);
$ret = '{SHA}' . base64_encode($passwordHash);
break;
case 'md5':
$passwordHash = md5($clearText, true);
$ret = '{MD5}' . base64_encode($passwordHash);
break;
case 'crypt':
$passwordHash = crypt($clearText, $salt);
case 'crypt_sha512':
$characters = array_merge(
range('0', '9'),
range('a', 'z'),
range('A', 'Z'),
['.', '/']
);
$salt = '';
$length = count($characters) - 1;
for ($i = 0; $i < 16; $i++) {
$salt .= $characters[rand(0, $length)];
}
$passwordHash = crypt($clearText, '$6$rounds=' . (int)$rounds . '$' . $salt . '$');
$ret = '{CRYPT}' . $passwordHash;
// no break
default:
......
......@@ -12,39 +12,55 @@ namespace T3o\T3oLdap\Utility;
* LICENSE.txt file that was distributed with this source code.
*/
use T3o\T3oLdap\Connectors\Ldap;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Password updating facility.
*/
class PasswordUpdate
class PasswordUpdate implements \Psr\Log\LoggerAwareInterface
{
const PASSWORD_METHODS = ['md5', 'sha1', 'crypt'];
use \Psr\Log\LoggerAwareTrait;
const PASSWORD_METHODS = ['crypt_sha512'];
/**
* Update a password in various places (LDAP, TYPO3)
*
* @param string $username The username to update the password for
* @param string $clearTextPassword Cleartext password to hash and update
* @return bool
*/
public function updatePassword(string $username, string $clearTextPassword)
public function updatePassword(string $username, string $clearTextPassword): bool
{
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3o_ldap']);
$ret = false;
if (version_compare(TYPO3_version, '9.0', '<')) {
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['t3o_ldap'] ?? '') ?? [];
} else {
$extensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['t3o_ldap'] ?? [];
}
// Check if LDAP updates are enabled in extension configuration
if ((int)$extensionConfiguration['enableLdapPasswordUpdates'] === 1) {
/** @var \T3o\T3oLdap\Connectors\Ldap $ldap */
$ldap = GeneralUtility::makeInstance(\T3o\T3oLdap\Connectors\Ldap::class);
if ($ldap->setLdapPasswords($username, $this->getHashedPasswords($clearTextPassword))) {
GeneralUtility::sysLog(
'Password successfully updated (Mechanisms: ' . strtoupper(implode(', ', self::PASSWORD_METHODS)) . ')',
't3o_ldap',
GeneralUtility::SYSLOG_SEVERITY_INFO
);
/** @var Ldap $ldap */
$ldap = GeneralUtility::makeInstance(Ldap::class);
$passwordUpdateResult = $ldap->setLdapPasswords($username, $this->getHashedPasswords($clearTextPassword));
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
if ($passwordUpdateResult === true) {
$this->logger->info('Password successfully updated (Mechanisms: ' . strtoupper(implode(', ', self::PASSWORD_METHODS)) . ')');
$ret = true;
} else {
$this->logger->info('Password has not been updated (Mechanisms: ' . strtoupper(implode(', ', self::PASSWORD_METHODS)) . ')');
}
}
return $ret;
}
/**
* @param string $clearTextPassword
* @return array
*/
public function getHashedPasswords(string $clearTextPassword): array
{
$passwords = [];
......
......@@ -13,6 +13,7 @@ namespace T3o\T3oLdap\Utility;
* LICENSE.txt file that was distributed with this source code.
*/
use T3o\T3oLdap\Connectors\Ldap;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -38,9 +39,9 @@ class UserCreateUpdateDelete
{
$ret = false;
/** @var \T3o\T3oLdap\Connectors\Ldap $ldap */
/** @var Ldap $ldap */
try {
$ldap = new \T3o\T3oLdap\Connectors\Ldap();
$ldap = new Ldap();
} catch (\Exception $e) {
throw $e;
}
......
......@@ -35,7 +35,7 @@ $EM_CONF[$_EXTKEY] = [
'constraints' => [
'depends' => [
'php' => '7.0.0-0.0.0',
'typo3' => '8.7.0-8.9.99',
'typo3' => '8.7.0',
'femanager' => '4.1.0-0.0.0'
],
'conflicts' => [
......
......@@ -33,8 +33,10 @@ use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class SlackImportCommandController extends CommandController
class SlackImportCommandController extends CommandController implements \Psr\Log\LoggerAwareInterface
{
use \Psr\Log\LoggerAwareTrait;
/**
* @var \T3o\T3oSlack\Domain\Repository\SlackUserRepository
* @inject
......@@ -113,10 +115,8 @@ class SlackImportCommandController extends CommandController
}
} while ($cursor);
$GLOBALS['BE_USER']->simplelog(
'Import of Slack User sucessful - imported ' . $counter . ' users',
't3o_slack'
);
$this->logger = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Import of Slack User sucessful - imported ' . $counter . ' users');
}
protected function getTSConfiguration()
......
......@@ -38,7 +38,7 @@ class SlackUserController extends ActionController
* action new
*
* @param \T3o\T3oSlack\Domain\Model\SlackUser $newSlackUser
* @dontvalidate $newSlackUser
* @ignorevalidation $newSlackUser
*/
public function newAction(SlackUser $newSlackUser = null)
{
......@@ -68,7 +68,7 @@ class SlackUserController extends ActionController
* action for errors and messages
*
* @param \T3o\T3oSlack\Domain\Model\SlackUser $newSlackUser
* @dontvalidate $newSlackUser
* @ignorevalidation $newSlackUser
*/
public function messageAction(SlackUser $newSlackUser = null)
{
......@@ -142,7 +142,7 @@ class SlackUserController extends ActionController
$logger->error(
'not handled exception in t3o_slack',
[
'response' => $error
'response' => $error,
]
);
if ($response['error']) {
......@@ -242,7 +242,7 @@ class SlackUserController extends ActionController
/**
* @param \T3o\T3oSlack\Domain\Model\SlackUser $newSlackUser
* @dontvalidate $newSlackUser
* @ignorevalidation $newSlackUser
*/
public function sendConfirmationMailAction($newSlackUser)
{
......@@ -286,7 +286,7 @@ class SlackUserController extends ActionController
/**
* @param \T3o\T3oSlack\Domain\Model\SlackUser $newSlackUser
* @dontvalidate $newSlackUser
* @ignorevalidation $newSlackUser
* @return bool
*/
public function sendConfirmationMail($newSlackUser)
......@@ -308,7 +308,7 @@ class SlackUserController extends ActionController
[
'user' => $user,
'hash' => HashUtility::createHashForUser($user),
'mail' => $newSlackUser->getEmail()
'mail' => $newSlackUser->getEmail(),
],
$femanagerSettings['new.']['email.']['createUserConfirmation.']
);
......
......@@ -22,12 +22,11 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
/**
* Check if a property of the userprofile is visible in the current context
*
* @param int $frontendUserUID
* @return string
*/
public function render(int $frontendUserUID)
public function render()
{
$feUser = $this->slackFrontendUserRepository->findByUid($frontendUserUID);
$feUser = $this->slackFrontendUserRepository->findByUid((int)$this->arguments['frontendUserUID']);
$slackUser = $this->slackUserRepository->findBySlackId($feUser->getSlackId());
if ($slackUser) {
......@@ -38,7 +37,7 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
}
} else {
// @todo render link to register for slack
if ($GLOBALS['TSFE']->fe_user->user['uid'] == $frontendUserUID) {
if ($GLOBALS['TSFE']->fe_user->user['uid'] === (int)$this->arguments['frontendUserUID']) {
// @todo add TS configuration
$content = '<a href="https://my.typo3.org/?id=23">Get your TYPO3 Slack Account</a>';
} else {
......@@ -48,4 +47,13 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
return $content;
}
/**
* Initialize
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('frontendUserUID', 'integer', 'UID of the FrontendUser which should get displayed');
}
}
......@@ -33,7 +33,7 @@ Otherwise your changes will be overwritten the next time you save the extension
<f:form.submit class="btn btn-primary" value="Create TYPO3 Slack account"/>
</f:form>
<p>If you have already a TYPO3 Slack Ascount, you can connect your account with your TYPO3.org user profile.</p>
<p>If you have already a TYPO3 Slack Account, you can connect your account with your TYPO3.org user profile.</p>
<f:link.action action="connect" class="btn btn-secondary">Connect now</f:link.action>
......
......@@ -9,7 +9,7 @@
"issues": "https://github.com/TYPO3-typo3org/t3o_slack/issues"
},
"require": {
"typo3/cms-core": "8.5.0 - 8.9.99"
"typo3/cms-core": "^8.7 || ^9.5"
},
"autoload": {
"psr-4": {
......
......@@ -29,7 +29,7 @@ $EM_CONF[$_EXTKEY] = [
'version' => '1.1.4',
'constraints' => [
'depends' => [
'typo3' => '8.5.0-8.99.99',
'typo3' => '8.7.0',
],
'conflicts' => [],
'suggests' => [],
......
......@@ -28,11 +28,6 @@ class MyProfile extends \In2code\Femanager\Domain\Model\User
*/
protected $termsVersion = '';
/**
* @var string
*/
protected $hashMd5 = '';
/**
* @var string
*/
......@@ -41,7 +36,7 @@ class MyProfile extends \In2code\Femanager\Domain\Model\User
/**
* @var string
*/
protected $hashCrypt = '';
protected $hashCryptSha512 = '';
/**
* @return string
......@@ -107,16 +102,6 @@ class MyProfile extends \In2code\Femanager\Domain\Model\User
$this->termsVersion = $termsVersion;
}
public function getHashMd5(): string
{
return $this->hashMd5;
}
public function setHashMd5(string $hashMd5)
{
$this->hashMd5 = $hashMd5;
}
public function getHashSha1(): string
{
return $this->hashSha1;
......@@ -127,13 +112,13 @@ class MyProfile extends \In2code\Femanager\Domain\Model\User
$this->hashSha1 = $hashSha1;
}
public function getHashCrypt(): string
public function getHashCryptSha512(): string
{
return $this->hashCrypt;
return $this->hashCryptSha512;
}
public function setHashCrypt(string $hashCrypt)
public function setHashCryptSha512(string $hashCryptSha512): void
{
$this->hashCrypt = $hashCrypt;
$this->hashCryptSha512 = $hashCryptSha512;
}
}
......@@ -173,6 +173,7 @@ class FeManagerHooks
$plainTextPassword = '';
if ($user->_isDirty('password') && $user->getPassword() !== '') {
$plainTextPassword = $user->getPassword();
$user->setPassword($this->getRandomPassword());
\In2code\Femanager\Utility\UserUtility::convertPassword($user, '');
}
$this->ldapUserCreateUpdateDelete->updateUser($user, true, $plainTextPassword);
......@@ -222,6 +223,7 @@ class FeManagerHooks
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$userRepository = $objectManager->get(\In2code\Femanager\Domain\Repository\UserRepository::class);
$plainTextPassword = $user->getPassword();
$user->setPassword($this->getRandomPassword());
\In2code\Femanager\Utility\UserUtility::hashPassword($user, '');
$userRepository->add($user);
$this->persistenceManager->persistAll();
......@@ -288,7 +290,8 @@ class FeManagerHooks
protected function getTSConfiguration()
{
// init ConfigurationManager
$configurationManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$configurationManager = $objectManager->get(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::class);
// load complete ts
$tsSettings = $configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
......@@ -327,6 +330,11 @@ class FeManagerHooks
return true;
}
private function getRandomPassword(): string
{
return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Crypto\Random::class)->generateRandomHexString(20);
}
/**
* @return string
*/
......
......@@ -27,7 +27,6 @@ namespace T3o\T3omy\Hooks;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
......@@ -102,7 +101,9 @@ class RecordListWorkflowFeUsers implements RecordListHookInterface
'id' => $row['pid']
];
$href = BackendUtility::getModuleUrl('web_list', $urlParameters);
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$href = $uriBuilder->buildUriFromRoute('web_list', $urlParameters);
$class = 'btn btn-default';
return '<a class="' . $class . '" href="' . $href . '">'
......
......@@ -27,7 +27,6 @@ namespace T3o\T3omy\Hooks;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
......@@ -101,7 +100,9 @@ class RecordListWorkflowOldUsers implements RecordListHookInterface
],
];
$href = BackendUtility::getModuleUrl('web_list', $urlParameters);
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$href = $uriBuilder->buildUriFromRoute('web_list', $urlParameters);
$class = 'btn btn-default';
return '<a class="' . $class . '" href="' . $href . '">'
......
......@@ -25,12 +25,11 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
/**
* Checks if the user is online in slack
*
* @param int $frontendUserUID
* @return string
*/
public function render($frontendUserUID)
public function render()
{
$feUser = $this->slackFrontendUserRepository->findByUid($frontendUserUID);
$feUser = $this->slackFrontendUserRepository->findByUid((int)$this->arguments['frontendUserUID']);
$slackUser = $this->slackUserRepository->findBySlackId($feUser->getSlackId());
if ($slackUser) {
......@@ -45,4 +44,13 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
}
return $status;
}
/**
* Initialize
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('frontendUserUID', 'integer', 'UID of the FrontendUser which should get displayed');
}
}
......@@ -32,23 +32,9 @@ $feUsersColumns = [
'type' => 'input'
],
],
'hash_md5' => [
'hash_crypt_sha512' => [
'exclude' => 0,
'label' => 'MD5 Hash of password',
'config' => [
'type' => 'none'
],
],
'hash_sha1' => [
'exclude' => 0,
'label' => 'SHA1 Hash of password',
'config' => [
'type' => 'none'
],
],
'hash_crypt' => [
'exclude' => 0,
'label' => 'Crypt Hash of password',
'label' => 'Crypt SHA512 Hash of password',
'config' => [
'type' => 'none'
],
......@@ -56,7 +42,7 @@ $feUsersColumns = [
];
$fields = 'github, twitter, facebook, terms_version';
$passwordHashFields = 'hash_md5, hash_sha1, hash_crypt';
$passwordHashFields = 'hash_crypt_sha512';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'fe_users',
......
......@@ -30,7 +30,7 @@ config.additionalHeaders {
30.header = X-Content-Security-Policy: default-src 'self' *.typo3.org; script-src 'unsafe-inline' *.typo3.org; font-src 'self' *.typo3.org fonts.googleapis.com fonts.gstatic.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self' data: *.typo3.org www.gravatar.com avatars.slack-edge.com
40.header = X-Webkit-CSP: default-src 'self' *.typo3.org; script-src 'unsafe-inline' *.typo3.org; font-src 'self' *.typo3.org fonts.googleapis.com fonts.gstatic.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self' data: *.typo3.org www.gravatar.com avatars.slack-edge.com
}
[global]
#### Set piwik tracking code for my.typo3.org
page {
......@@ -58,3 +58,4 @@ page {
)
}
}
[global]
......@@ -249,7 +249,7 @@
<strong>Private user data</strong>
<br>
In some cases we need to collect your private user data, to process certain information on this website. This data will
not be give to any other third party without your explicit written notice. In some cases we might be forced to give the
not be given to any other third party without your explicit written notice. In some cases we might be forced to give the
data to official government agencies.
</p>
......@@ -258,9 +258,9 @@
<p style="Margin:0;color:#4a4a4a;font-family:'Source Sans Pro', 'Helvetica', 'Arial', sans-serif;font-size:14px;font-weight:400;line-height:20px;margin:0;padding:0;text-align:left">
<strong>Exposure of your profile and online activities</strong>
<br>
Please be aware that by using our mailinglists, forums and services your profile and activities will be availabe to the
general public thru search engines and archives. As we also require you to use your real name while using the ressources
we ask you to act accordingly to our code of conduct too.
Please be aware that by using our mailing lists, forums and services your profile and activities will be available to the
general public through search engines and archives. As we also require you to use your real name while using the resources
we ask you to act according to our code of conduct too.
</p>
<!-- space with background color -->
......
......@@ -168,7 +168,7 @@
<br>
<p style="Margin:0;color:#4a4a4a;font-family:'Source Sans Pro', 'Helvetica', 'Arial', sans-serif;font-size:14px;font-weight:400;line-height:20px;margin:0;padding:0;text-align:center">
we have received your request for a <a href="httpd://TYPO3.org" style="text-decoration: none; color:#4a4a4a">typo3.org</a> login account.
we have received your request for a <a href="https://typo3.org" style="text-decoration: none; color:#4a4a4a">typo3.org</a> login account.
<br><br>
Due to an immensive amount of spam subscriptions, we are currently approving new accounts after manual verification.
<br><br>
......
......@@ -68,7 +68,7 @@
<f:image image="{image}" width="250" />
</f:for>
<div >
<f:link.action controller="Edit" pageUid="24" action="edit" arguments="{user:user}" class="btn btn-primary" >Edit your profile</f:link.action>
<f:link.page pageUid="24" class="btn btn-primary" >Edit your profile</f:link.page>
</div>
</f:then>
<f:else>
......
......@@ -8,10 +8,10 @@ $EM_CONF[$_EXTKEY] = [
'category' => 'extension',
'constraints' => [
'depends' => [
'typo3' => '8.7.0-8.99.99',
'typo3' => '8.7.0',
't3olayout' => '0.1.0-',
't3o_slack' => '0.1.0-',
'fluid_styled_content' => '7.6.0-8.99.99',
'fluid_styled_content' => '8.7.0',
'userprofile' => '0.0.1-',
'femanager' => '4.0.0-'
],
......
......@@ -7,9 +7,7 @@ CREATE TABLE fe_users (
facebook VARCHAR (255),
terms_version VARCHAR (255),
hash_md5 VARCHAR(255) DEFAULT '' NOT NULL,
hash_sha1 VARCHAR(255) DEFAULT '' NOT NULL,
hash_crypt VARCHAR(255) DEFAULT '' NOT NULL
hash_crypt_sha512 VARCHAR(255) DEFAULT '' NOT NULL
);
CREATE TABLE old_users (
......
......@@ -31,7 +31,7 @@ config.tx_extbase {
}
}
[applicationContext = Production/Live]
[applicationContext = Production]
config.additionalHeaders {
10.header = X-Powered-By: nothing
20.header = Content-Security-Policy: default-src 'self' *.typo3.org; script-src 'unsafe-inline' *.typo3.org; font-src 'self' fonts.googleapis.com fonts.gstatic.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self' data: *.typo3.org www.gravatar.com
......
#!/bin/bash
# You need to execute this file, whenever you start a project, where you want to use an ldap connection.
# This script will add the ldap module to the nginx-php container from ddev.
# Afterwards you need to restart your ddev project: ddev stop && ddev start
docker exec -u root -it ddev-my.typo3.org-web apt update
docker exec -u root -it ddev-my.typo3.org-web apt install php7.0-ldap
......@@ -25,3 +25,4 @@ $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = [
];
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$P$CZqeoYBTHC0kXKny4tpTvBSzzV5wVY0'; /* joh316 */
$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = ' LOCAL: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
......@@ -5,6 +5,10 @@ return [
'explicitADmode' => 'explicitAllow',
'installToolPassword' => '$pbkdf2-sha256$25000$oRS5QrY6LY0VQWgAxx5hcQ$mM7JqvMgnEfY1FtIW6Ngcj7mJqUNto4kBNJmRv0gUFk',
'loginSecurityLevel' => 'normal',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'DB' => [
'Connections' => [
......@@ -21,47 +25,101 @@ return [
],
'EXT' => [
'extConf' => [
'backend' => 'a:5:{s:9:"loginLogo";s:0:"";s:19:"loginHighlightColor";s:0:"";s:20:"loginBackgroundImage";s:0:"";s:11:"backendLogo";s:0:"";s:14:"backendFavicon";s:0:"";}',
'belog' => 'a:0:{}',
'beuser' => 'a:0:{}',
'documentation' => 'a:0:{}',
'backend' => 'a:6:{s:14:"backendFavicon";s:0:"";s:11:"backendLogo";s:0:"";s:20:"loginBackgroundImage";s:0:"";s:13:"loginFootnote";s:0:"";s:19:"loginHighlightColor";s:0:"";s:9:"loginLogo";s:0:"";}',
'extensionmanager' => 'a:2:{s:21:"automaticInstallation";s:1:"1";s:11:"offlineMode";s:1:"0";}',
'felogin' => 'a:0:{}',
'femanager' => 'a:4:{s:13:"disableModule";s:1:"0";s:24:"enableConfirmationModule";s:1:"1";s:10:"disableLog";s:1:"0";s:16:"setCookieOnLogin";s:1:"0";}',
'fluid_styled_content' => 'a:0:{}',
'form' => 'a:0:{}',
'gitlab_api' => 'a:0:{}',
'gridelements' => 'a:3:{s:20:"additionalStylesheet";s:0:"";s:19:"nestingInListModule";s:1:"0";s:26:"overlayShortcutTranslation";s:1:"0";}',
'ig_ldap_sso_auth' => 'a:18:{s:18:"checkConfiguration";s:1:"0";s:21:"throwExceptionAtLogin";s:1:"1";s:22:"forceLowerCaseUsername";s:1:"1";s:26:"enableBELDAPAuthentication";s:1:"0";s:17:"TYPO3BEGroupExist";s:1:"0";s:16:"TYPO3BEUserExist";s:1:"0";s:10:"BEfailsafe";s:1:"0";s:27:"TYPO3BEGroupsNotSynchronize";s:1:"0";s:12:"keepBEGroups";s:1:"0";s:11:"enableBESSO";s:1:"0";s:26:"enableFELDAPAuthentication";s:1:"1";s:31:"TYPO3FEDeleteUserIfNoLDAPGroups";s:1:"0";s:32:"TYPO3FEDeleteUserIfNoTYPO3Groups";s:1:"0";s:17:"TYPO3FEGroupExist";s:1:"0";s:16:"TYPO3FEUserExist";s:1:"0";s:27:"TYPO3FEGroupsNotSynchronize";s:1:"1";s:12:"keepFEGroups";s:1:"1";s:11:"enableFESSO";s:1:"0";}',
'info' => 'a:0:{}',
'info_pagetsconfig' => 'a:0:{}',
'realurl' => 'a:6:{s:10:"configFile";s:34:"typo3conf/RealurlConfiguration.php";s:14:"enableAutoConf";s:1:"0";s:14:"autoConfFormat";s:1:"0";s:17:"segTitleFieldList";s:0:"";s:12:"enableDevLog";s:1:"0";s:10:"moduleIcon";s:1:"0";}',
'recycler' => 'a:0:{}',
'rsaauth' => 'a:1:{s:18:"temporaryDirectory";s:0:"";}',
'rte_ckeditor' => 'a:0:{}',
'saltedpasswords' => 'a:2:{s:3:"BE.";a:4:{s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\Pbkdf2Salt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}s:3:"FE.";a:5:{s:7:"enabled";i:1;s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\Pbkdf2Salt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}}',
'scheduler' => 'a:4:{s:11:"maxLifetime";s:4:"1440";s:11:"enableBELog";s:1:"1";s:15:"showSampleTasks";s:1:"1";s:11:"useAtdaemon";s:1:"0";}',
'setup' => 'a:0:{}',
'gridelements' => 'a:6:{s:20:"additionalStylesheet";s:0:"";s:38:"disableAutomaticUnusedColumnCorrection";s:1:"0";s:25:"disableCopyFromPageButton";s:1:"0";s:19:"disableDragInWizard";s:1:"0";s:19:"nestingInListModule";s:1:"0";s:26:"overlayShortcutTranslation";s:1:"0";}',
'ig_ldap_sso_auth' => 'a:18:{s:10:"BEfailsafe";s:1:"0";s:17:"TYPO3BEGroupExist";s:1:"0";s:27:"TYPO3BEGroupsNotSynchronize";s:1:"0";s:16:"TYPO3BEUserExist";s:1:"0";s:31:"TYPO3FEDeleteUserIfNoLDAPGroups";s:1:"0";s:32:"TYPO3FEDeleteUserIfNoTYPO3Groups";s:1:"0";s:17:"TYPO3FEGroupExist";s:1:"0";s:27:"TYPO3FEGroupsNotSynchronize";s:1:"1";s:16:"TYPO3FEUserExist";s:1:"0";s:26:"enableBELDAPAuthentication";s:1:"0";s:11:"enableBESSO";s:1:"0";s:26:"enableFELDAPAuthentication";s:1:"1";s:11:"enableFESSO";s:1:"0";s:22:"forceLowerCaseUsername";s:1:"0";s:12:"keepBEGroups";s:1:"0";s:12:"keepFEGroups";s:1:"1";s:21:"throwExceptionAtLogin";s:1:"0";s:23:"useExtConfConfiguration";s:1:"0";}',
'scheduler' => 'a:2:{s:11:"maxLifetime";s:4:"1440";s:15:"showSampleTasks";s:1:"1";}',
'static_info_tables' => 'a:1:{s:13:"enableManager";s:1:"0";}',
't3o_ldap' => 'a:8:{s:29:"enableExternalPasswordUpdates";s:1:"0";s:25:"enableLdapPasswordUpdates";s:1:"0";s:10:"ldapServer";s:9:"127.0.0.1";s:14:"ldapServerPort";s:3:"389";s:19:"ldapProtocolVersion";s:1:"3";s:10:"ldapBindDn";s:0:"";s:16:"ldapBindPassword";s:0:"";s:28:"ldapBaseDnForPasswordChanges";s:0:"";}',
't3o_slack' => 'a:0:{}',
't3olayout' => 'a:0:{}',
't3omy' => 'a:0:{}',
'tstemplate' => 'a:0:{}',
'userprofile' => 'a:0:{}',
't3o_ldap' => 'a:8:{s:29:"enableExternalPasswordUpdates";s:1:"0";s:25:"enableLdapPasswordUpdates";s:1:"0";s:28:"ldapBaseDnForPasswordChanges";s:0:"";s:10:"ldapBindDn";s:0:"";s:16:"ldapBindPassword";s:0:"";s:19:"ldapProtocolVersion";s:1:"3";s:10:"ldapServer";s:9:"127.0.0.1";s:14:"ldapServerPort";s:3:"389";}',
],
],
'EXTCONF' => [
'helhum-typo3-console' => [
'initialUpgradeDone' => '9.5',
],
],
'EXTENSIONS' => [
'backend' => [
'backendFavicon' => '',
'backendLogo' => '',
'loginBackgroundImage' => '',
'loginFootnote' => '',
'loginHighlightColor' => '',
'loginLogo' => '',
],
'extensionmanager' => [
'automaticInstallation' => '1',
'offlineMode' => '0',
],
'femanager' => [
'disableLog' => '0',
'disableModule' => '0',
'enableConfirmationModule' => '1',
'setCookieOnLogin' => '0',
],
'gridelements' => [
'additionalStylesheet' => '',
'disableAutomaticUnusedColumnCorrection' => '0',
'disableCopyFromPageButton' => '0',
'disableDragInWizard' => '0',
'nestingInListModule' => '0',
'overlayShortcutTranslation' => '0',
],
'ig_ldap_sso_auth' => [
'BEfailsafe' => '0',
'TYPO3BEGroupExist' => '0',
'TYPO3BEGroupsNotSynchronize' => '0',
'TYPO3BEUserExist' => '0',
'TYPO3FEDeleteUserIfNoLDAPGroups' => '0',
'TYPO3FEDeleteUserIfNoTYPO3Groups' => '0',
'TYPO3FEGroupExist' => '0',
'TYPO3FEGroupsNotSynchronize' => '1',
'TYPO3FEUserExist' => '0',
'enableBELDAPAuthentication' => '0',
'enableBESSO' => '0',
'enableFELDAPAuthentication' => '1',
'enableFESSO' => '0',
'forceLowerCaseUsername' => '0',
'keepBEGroups' => '0',
'keepFEGroups' => '1',
'throwExceptionAtLogin' => '0',
'useExtConfConfiguration' => '0',
],
'scheduler' => [
'maxLifetime' => '1440',
'showSampleTasks' => '1',
],
'static_info_tables' => [
'enableManager' => '0',
],
't3o_ldap' => [
'enableExternalPasswordUpdates' => '0',
'enableLdapPasswordUpdates' => '0',
'ldapBaseDnForPasswordChanges' => '',
'ldapBindDn' => '',
'ldapBindPassword' => '',
'ldapProtocolVersion' => '3',
'ldapServer' => '127.0.0.1',
'ldapServerPort' => '389',
],
],
'FE' => [
'debug' => true,
'loginSecurityLevel' => 'normal',
'pageNotFound_handling' => '/index.php?id=404&no_cache=1',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'GFX' => [
'jpg_quality' => '80',
'processor' => 'ImageMagick',
'processor_allowTemporaryMasksAsPng' => false,
'processor_colorspace' => 'sRGB',
'processor_effects' => 1,
'processor_effects' => true,
'processor_enabled' => true,
'processor_path' => '/usr/bin/',
'processor_path_lzw' => '/usr/bin/',
......@@ -91,13 +149,9 @@ return [
],
'devIPmask' => '*',
'displayErrors' => 1,
'enableDeprecationLog' => 'file',
'encryptionKey' => 'db379ac7cd9a141040b6b9eca3fd574c0513c1200bdf1af600794d434a682b7ff170107496d1f0445d432d0e7d2a74f5',
'exceptionalErrors' => 28674,
'isInitialDatabaseImportDone' => true,
'isInitialInstallationInProgress' => false,
'exceptionalErrors' => 12290,
'sitename' => 'my.typo3.org',
'sqlDebug' => 1,
'systemLogLevel' => 0,
],
];