mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2024-11-01 04:44:37 +01:00
Compare commits
No commits in common. "master" and "v2.0.5" have entirely different histories.
10
CHANGELOG.md
10
CHANGELOG.md
@ -19,17 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## 2.0.9 - 25 Juni 2024
|
|
||||||
- add check $oCaptcha in templates
|
|
||||||
|
|
||||||
## 2.0.8 - 08 September 2023
|
|
||||||
- add check for Amazon Pay - no Captcha
|
|
||||||
|
|
||||||
## 2.0.7 - 08 September 2023
|
|
||||||
- add check for PayPal Checkout - no Captcha
|
|
||||||
|
|
||||||
## 2.0.6 - 18 Juli 2023
|
|
||||||
- don't request captcha if user is logged in
|
|
||||||
|
|
||||||
## [2.0.4] - 22 Oct 2021
|
## [2.0.4] - 22 Oct 2021
|
||||||
|
|
||||||
|
@ -30,25 +30,6 @@ class oeUserComponent extends oeUserComponent_parent
|
|||||||
|
|
||||||
public function createUser()
|
public function createUser()
|
||||||
{
|
{
|
||||||
/* START check for Amazon Pay - no Captcha */
|
|
||||||
ob_start();
|
|
||||||
debug_print_backtrace();
|
|
||||||
$trace = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
|
|
||||||
if(str_contains($trace, 'initAmazonPayExpress'))
|
|
||||||
{
|
|
||||||
return parent::createUser();
|
|
||||||
}
|
|
||||||
/* END check for Amazon Pay - no Captcha /
|
|
||||||
|
|
||||||
/* START check for PayPal Checkout - no Captcha */
|
|
||||||
if(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('fnc') == 'approveOrder')
|
|
||||||
{
|
|
||||||
return parent::createUser();
|
|
||||||
}
|
|
||||||
/* START check for PayPal Checkout - no Captcha */
|
|
||||||
|
|
||||||
if (!$this->getCaptcha()->passCaptcha()) {
|
if (!$this->getCaptcha()->passCaptcha()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
[{$smarty.block.parent}]
|
[{$smarty.block.parent}]
|
||||||
|
|
||||||
[{if !$oxcmp_user}]
|
[{include file="oecaptcha_wave.tpl" labelCssClass="col-lg-3" inputCssClass="col-lg-5"}]
|
||||||
[{include file="oecaptcha_wave.tpl" labelCssClass="col-lg-3" inputCssClass="col-lg-5"}]
|
|
||||||
[{/if}]
|
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
|
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
|
||||||
[{if $oCaptcha}]
|
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
|
||||||
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
|
|
||||||
|
|
||||||
<div class="form-group verify">
|
<div class="form-group verify">
|
||||||
<label class="req control-label [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
|
<label class="req control-label [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
|
||||||
|
|
||||||
<div class="[{$inputCssClass}] controls">
|
<div class="[{$inputCssClass}] controls">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
[{if $oCaptcha->isImageVisible()}]
|
[{if $oCaptcha->isImageVisible()}]
|
||||||
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
|
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
|
||||||
[{else}]
|
[{else}]
|
||||||
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
|
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
|
||||||
[{/if}]
|
[{/if}]
|
||||||
</span>
|
</span>
|
||||||
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
|
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
[{/if}]
|
</div>
|
@ -1,21 +1,19 @@
|
|||||||
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
|
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
|
||||||
[{if $oCaptcha}]
|
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
|
||||||
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
|
|
||||||
|
|
||||||
<div class="form-group row verify">
|
<div class="form-group row verify">
|
||||||
<label class="req [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
|
<label class="req [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
|
||||||
|
|
||||||
<div class="[{$inputCssClass}]">
|
<div class="[{$inputCssClass}]">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon" style="padding-right:15px">
|
<span class="input-group-addon" style="padding-right:15px">
|
||||||
[{if $oCaptcha->isImageVisible()}]
|
[{if $oCaptcha->isImageVisible()}]
|
||||||
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
|
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
|
||||||
[{else}]
|
[{else}]
|
||||||
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
|
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
|
||||||
[{/if}]
|
[{/if}]
|
||||||
</span>
|
</span>
|
||||||
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
|
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
[{/if}]
|
</div>
|
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
|
|
||||||
*/
|
|
||||||
|
|
||||||
class oecaptchaaccountuser extends oecaptchaaccountuser_parent
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Class handling CAPTCHA image.
|
|
||||||
*
|
|
||||||
* @var object
|
|
||||||
*/
|
|
||||||
protected $captcha = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Template variable getter. Returns object of handling CAPTCHA image
|
|
||||||
*
|
|
||||||
* @return object
|
|
||||||
*/
|
|
||||||
public function getCaptcha()
|
|
||||||
{
|
|
||||||
if ( $this->captcha === null ) {
|
|
||||||
$this->captcha = oxNew( 'oeCaptcha' );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->captcha;
|
|
||||||
}
|
|
||||||
}
|
|
81
metadata.php
81
metadata.php
@ -17,10 +17,6 @@
|
|||||||
/**
|
/**
|
||||||
* Metadata version
|
* Metadata version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use OxidEsales\Eshop\Application\Component\UserComponent;
|
|
||||||
use OxidEsales\Eshop\Application\Controller\AccountUserController;
|
|
||||||
|
|
||||||
$sMetadataVersion = '1.1';
|
$sMetadataVersion = '1.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,7 +33,7 @@ $aModule = array(
|
|||||||
'en' => 'OXID eSales Simple Captcha Module',
|
'en' => 'OXID eSales Simple Captcha Module',
|
||||||
),
|
),
|
||||||
'thumbnail' => 'out/pictures/picture.png',
|
'thumbnail' => 'out/pictures/picture.png',
|
||||||
'version' => '2.0.9',
|
'version' => '2.0.5',
|
||||||
'author' => 'OXID eSales AG',
|
'author' => 'OXID eSales AG',
|
||||||
'url' => 'https://www.oxid-esales.com/',
|
'url' => 'https://www.oxid-esales.com/',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
@ -49,10 +45,9 @@ $aModule = array(
|
|||||||
'pricealarm' => 'oe/captcha/controllers/oecaptchapricealarm',
|
'pricealarm' => 'oe/captcha/controllers/oecaptchapricealarm',
|
||||||
'suggest' => 'oe/captcha/controllers/oecaptchasuggest',
|
'suggest' => 'oe/captcha/controllers/oecaptchasuggest',
|
||||||
'oxwarticledetails' => 'oe/captcha/application/component/widget/oecaptchawarticledetails',
|
'oxwarticledetails' => 'oe/captcha/application/component/widget/oecaptchawarticledetails',
|
||||||
UserComponent::class => 'oe/captcha/application/component/oeusercomponent',
|
\OxidEsales\Eshop\Application\Component\UserComponent::class => 'oe/captcha/application/component/oeusercomponent',
|
||||||
'register' => 'oe/captcha/controllers/oecaptcharegister',
|
'register' => 'oe/captcha/controllers/oecaptcharegister',
|
||||||
'user' => 'oe/captcha/controllers/oecaptchauser',
|
'user' => 'oe/captcha/controllers/oecaptchauser'
|
||||||
AccountUserController::class => 'oe/captcha/controllers/oecaptchaaccountuser'
|
|
||||||
),
|
),
|
||||||
'files' => array(
|
'files' => array(
|
||||||
'oecaptcha' => 'oe/captcha/core/oecaptcha.php',
|
'oecaptcha' => 'oe/captcha/core/oecaptcha.php',
|
||||||
@ -63,63 +58,21 @@ $aModule = array(
|
|||||||
'oecaptcha_wave.tpl' => 'oe/captcha/application/views/tpl/oecaptcha_wave.tpl',
|
'oecaptcha_wave.tpl' => 'oe/captcha/application/views/tpl/oecaptcha_wave.tpl',
|
||||||
),
|
),
|
||||||
'blocks' => array(
|
'blocks' => array(
|
||||||
array('template' => 'form/contact.tpl',
|
array('template' => 'form/contact.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
'block'=>'captcha_form',
|
array('template' => 'form/newsletter.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
'theme' => 'flow',
|
array('template' => 'form/privatesales/invite.tpl', 'theme' => 'flow', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
array('template' => 'form/pricealarm.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
array('template' => 'form/newsletter.tpl',
|
array('template' => 'form/suggest.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
'block'=>'captcha_form',
|
array('template' => 'form/forgotpwd_email.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form_forgotpwd.tpl'),
|
||||||
'theme' => 'flow',
|
array('template' => 'form/fieldset/user_billing.tpl', 'block'=>'captcha_form', 'theme' => 'flow', 'file'=>'/application/views/blocks/captcha_form.tpl'),
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
|
||||||
array('template' => 'form/privatesales/invite.tpl',
|
|
||||||
'theme' => 'flow',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
|
||||||
array('template' => 'form/pricealarm.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'flow',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
|
||||||
array('template' => 'form/suggest.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'flow',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
|
||||||
array('template' => 'form/forgotpwd_email.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'flow',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_forgotpwd.tpl'),
|
|
||||||
array('template' => 'form/fieldset/user_billing.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'flow',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form.tpl'),
|
|
||||||
|
|
||||||
array('template' => 'form/contact.tpl',
|
array('template' => 'form/contact.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_contact_wave.tpl'),
|
||||||
'block'=>'captcha_form',
|
array('template' => 'form/newsletter.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_newsletter_wave.tpl'),
|
||||||
'theme' => 'wave',
|
array('template' => 'form/privatesales/invite.tpl', 'theme' => 'wave', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
||||||
'file'=>'/application/views/blocks/captcha_form_contact_wave.tpl'),
|
array('template' => 'form/pricealarm.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
||||||
array('template' => 'form/newsletter.tpl',
|
array('template' => 'form/suggest.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
||||||
'block'=>'captcha_form',
|
array('template' => 'form/forgotpwd_email.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_forgotpwd_wave.tpl'),
|
||||||
'theme' => 'wave',
|
array('template' => 'form/fieldset/user_billing.tpl', 'block'=>'captcha_form', 'theme' => 'wave', 'file'=>'/application/views/blocks/captcha_form_user_billing_wave.tpl'),
|
||||||
'file'=>'/application/views/blocks/captcha_form_newsletter_wave.tpl'),
|
|
||||||
array('template' => 'form/privatesales/invite.tpl',
|
|
||||||
'theme' => 'wave',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
|
||||||
array('template' => 'form/pricealarm.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'wave',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
|
||||||
array('template' => 'form/suggest.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'wave',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_wave.tpl'),
|
|
||||||
array('template' => 'form/forgotpwd_email.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'wave',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_forgotpwd_wave.tpl'),
|
|
||||||
array('template' => 'form/fieldset/user_billing.tpl',
|
|
||||||
'block'=>'captcha_form',
|
|
||||||
'theme' => 'wave',
|
|
||||||
'file'=>'/application/views/blocks/captcha_form_user_billing_wave.tpl'),
|
|
||||||
),
|
),
|
||||||
'settings' => array(
|
'settings' => array(
|
||||||
array('group' => 'main', 'name' => 'oecaptchakey', 'type' => 'str', 'value' => ''),
|
array('group' => 'main', 'name' => 'oecaptchakey', 'type' => 'str', 'value' => ''),
|
||||||
|
Loading…
Reference in New Issue
Block a user