Compare commits
9 Commits
8502ea3910
...
f2c9f81af5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f2c9f81af5 | ||
![]() |
22a5b811b6 | ||
![]() |
2d9bc26ce6 | ||
![]() |
9acf239483 | ||
![]() |
cd116df569 | ||
![]() |
dede4d0efa | ||
![]() |
c191e6e635 | ||
![]() |
74f9767cf4 | ||
![]() |
6f1383ce50 |
@ -27,6 +27,7 @@ use TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationBuilder;
|
||||
use TYPO3\CMS\Extbase\Service\EnvironmentService;
|
||||
use TYPO3\CMS\Extbase\Service\ExtensionService;
|
||||
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
||||
use Blueways\BwCaptcha\Validation\Validator\CaptchaValidator;
|
||||
|
||||
class ActionController extends BaseController
|
||||
{
|
||||
@ -584,7 +585,7 @@ class ActionController extends BaseController
|
||||
if (in_array($argument->getName(), ['step', 'submit', $object])) {
|
||||
continue;
|
||||
}
|
||||
if (method_exists($argument->getValue(), 'getUid')) {
|
||||
if (is_string($argument->getValue()) && method_exists($argument->getValue(), 'getUid')) {
|
||||
$pluginArguments[$argument->getName()]
|
||||
= $argument->getValue()->getUid();
|
||||
} else {
|
||||
@ -835,4 +836,26 @@ class ActionController extends BaseController
|
||||
);
|
||||
}
|
||||
}
|
||||
/** **/
|
||||
protected function valideCaptcha($captchaId, $value
|
||||
) {
|
||||
$cacheIdentifier = $GLOBALS['TSFE']->fe_user->getKey('ses', $captchaId);
|
||||
|
||||
if (!$cacheIdentifier) {
|
||||
$this->addValidationError(
|
||||
'captcha',
|
||||
'validator.notvalid'
|
||||
);
|
||||
}
|
||||
// get captcha secret from cache and compare
|
||||
$cache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('bwcaptcha');
|
||||
$phrase = $cache->get($cacheIdentifier);
|
||||
if ($phrase && $phrase === $value) {
|
||||
return true;
|
||||
}
|
||||
$this->addValidationError(
|
||||
'captcha',
|
||||
'validator.notvalid'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,11 @@ class TranslationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
|
||||
$languageFactory = GeneralUtility::makeInstance(
|
||||
LocalizationFactory::class
|
||||
);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$language = $this->request->getAttribute('language');
|
||||
} else {
|
||||
$language = $GLOBALS['TYPO3_REQUEST']->getAttribute('language');
|
||||
}
|
||||
$locale = $language->getLocale();
|
||||
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
|
||||
// $locale, '$locale', 3, true, false
|
||||
|
@ -17,6 +17,7 @@ use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
@ -76,6 +77,9 @@ class ApiUtility
|
||||
if (substr($method, 0, 3) === 'get') {
|
||||
$methodResult = call_user_func([$row, $method]);
|
||||
$attributeName = lcfirst(substr($method, 3));
|
||||
if (get_class($methodResult) == LazyLoadingProxy::class) {
|
||||
$methodResult = $methodResult->_loadRealInstance();
|
||||
}
|
||||
$propertieResults[$attributeName] = $methodResult;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
|
||||
use TYPO3\CMS\Fluid\View\TemplatePaths;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use Symfony\Component\Mime\Address;
|
||||
|
||||
use TYPO3\CMS\Frontend\Page\PageRepository;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -221,7 +221,7 @@ class MailUtility
|
||||
$textView->setTemplate($templateNameText);
|
||||
$mail = GeneralUtility::makeInstance(MailMessage::class);
|
||||
if (version_compare(TYPO3_branch, '10.0', '>=')) {
|
||||
$mail->from(new Address($sender));
|
||||
$mail->from(new Address(key($sender),$sender[key($sender)]));
|
||||
$mail->subject($subject);
|
||||
} else {
|
||||
$mail->setFrom($sender);
|
||||
@ -368,7 +368,17 @@ class MailUtility
|
||||
if ($assetDomain) {
|
||||
$domain = $assetDomain;
|
||||
}
|
||||
$dataProtectionPid = $settings['dataProtectionPid'];
|
||||
$uriBuilder = $objectManager->get(
|
||||
UriBuilder::class
|
||||
);
|
||||
if ($dataProtectionPid) {
|
||||
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
||||
$urlPage = $pageRepository->getPage($settings['dataProtectionPid']);
|
||||
$dataProtectionPid = $domain.$urlPage['slug'];
|
||||
}
|
||||
$htmlView->assign('domain', $domain);
|
||||
$htmlView->assign('linkDataprotection', $dataProtectionPid);
|
||||
$textBody = $textView->render();
|
||||
$htmlBody = $htmlView->render();
|
||||
if ($domain) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user