8
0
Mirror von https://git.d3data.de/3rdParty/captcha-module.git synchronisiert 2024-10-31 20:34:38 +01:00

Commits vergleichen

..

45 Commits

Autor SHA1 Nachricht Datum
0607bbaa7c add check for oCaptcha 2024-06-25 10:06:15 +02:00
61133da014 add check for oCaptcha 2024-06-25 10:04:06 +02:00
ffcfed8ba0 Merge branch 'master' of https://git.d3data.de/3rdParty/captcha-module into master 2024-06-25 09:59:34 +02:00
45657767e4 mod CHANGELOG.md, add some comments 2024-05-21 14:06:23 +02:00
a2fdc17247 Ausnahmebedingung für Amazon Pay 2024-05-21 14:06:23 +02:00
5620d6b460 add Version 2.0.7 2024-05-21 14:06:22 +02:00
0305d484a3 Remove complication with PayPal Checkout 2024-05-21 14:06:22 +02:00
ba5d8d04af adjust version informations 2024-05-21 14:06:22 +02:00
3d0025cbc9 don't show and request captcha if user is logged in 2024-05-21 14:06:22 +02:00
4e038ef885 initial preparation for ticket https://support.shopmodule.com/scp/tickets.php?id=11765 2024-05-21 14:06:21 +02:00
c44887803e update Version to 2.0.5 2024-05-21 14:06:21 +02:00
33fe2d8ade add templates for wave theme 2024-05-21 14:06:21 +02:00
ae340f8569 add check for user 2024-05-21 14:06:20 +02:00
0c74177b15 add check for register 2024-05-21 14:06:20 +02:00
2ac4507ace mod CHANGELOG.md, add some comments 2023-11-16 09:29:03 +01:00
69618b8db5 Ausnahmebedingung für Amazon Pay 2023-11-15 14:38:08 +01:00
e1be2b618a add Version 2.0.7 2023-09-05 14:43:06 +02:00
e7b5947a3d Remove complication with PayPal Checkout 2023-09-05 14:38:17 +02:00
LarsStegelitz@Oxid
b8f1c7e8aa
Merge pull request #11 from OXIDprojects/revert-10-master
Revert "Upgrade to OXID 7 with Twig & Smarty"
2023-08-15 14:14:10 +02:00
LarsStegelitz@Oxid
64abb3b36f
Revert "Upgrade to OXID 7 with Twig & Smarty" 2023-08-15 14:11:11 +02:00
Fabian Vogel
3acc30a3a5
Merge pull request #10 from gp-itholics/master
Upgrade to OXID 7 with Twig & Smarty
2023-08-15 14:00:33 +02:00
Gabriel Peleskei
8926e6618d Finalized module for smarty, added more blocks in templates 2023-07-19 10:56:36 +00:00
Gabriel Peleskei
e802847f06 twig support tested manually 2023-07-19 09:05:40 +00:00
Gabriel Peleskei
bd415ccb3e Basic changes made for smarty and base code 2023-07-18 14:59:11 +00:00
ce5fcbd664
adjust version informations 2023-07-18 12:16:37 +02:00
91d21f7f07
don't show and request captcha if user is logged in 2023-07-18 12:13:25 +02:00
0dbb8fb6e3
initial preparation for ticket https://support.shopmodule.com/scp/tickets.php?id=11765 2023-06-30 10:29:30 +02:00
477aef9b4a update Version to 2.0.5 2022-05-16 15:15:35 +02:00
e9ebf89c6a add templates for wave theme 2022-05-16 15:14:57 +02:00
9e5c91bed7 add check for user 2022-03-14 11:14:24 +01:00
81b9602b10 add check for register 2022-02-23 09:20:32 +01:00
[OXID-PS] Keywan Ghadami
2b8493d37a
fix version number 2021-10-22 18:05:41 +02:00
[OXID-PS] Keywan Ghadami
d1aceb0e64
Update CHANGELOG.md 2021-10-22 18:05:21 +02:00
[OXID-PS] Keywan Ghadami
905739672c
Update CHANGELOG.md 2021-10-22 18:04:08 +02:00
[OXID-PS] Keywan Ghadami
40e6416096
fix metadata version number 2021-10-22 18:03:39 +02:00
[OXID-PS] Keywan Ghadami
e974a30707
Update CHANGELOG.md 2021-10-22 17:56:42 +02:00
[OXID-PS] Keywan Ghadami
35e5d631d0
Merge pull request #8 from bissie/array_access_curly_braces
Fix: Curly brace access syntax is deprecated since PHP 7.4
2021-10-22 17:48:33 +02:00
AndreasBissinger
f564baf9bf Fix: Curly brace access syntax is deprecated since PHP 7.4 2021-10-22 14:11:29 +02:00
Marco Steinhaeuser
f8bdc5285c
Merge pull request #6 from SeifertDaniel/feature/newslettercaptcha
Captcha for newsletter subscription added
2020-12-10 09:22:50 +01:00
087f912897
insert Captcha also in the forgotten password form, as this is also often used for spam 2020-11-16 13:18:30 +01:00
89d543156f
Captcha for newsletter subscription added
This form is often used for spam attacks.
Requires new template blocks in the frontend theme.
2020-11-14 12:44:46 +01:00
Marco Steinhaeuser
88c9ffa235
Merge pull request #2 from proud-commerce/master
Changed template
2020-01-10 18:14:47 +01:00
Florian Palme
8cfe123289 removed false markup 2019-07-02 16:07:37 +02:00
Florian Palme
d8810b495f moved code to its own template file and changed markup to match flow template 2019-07-02 16:00:08 +02:00
Anton Fedurtsya
3821698f12 OXDEV-473 Module added to packagist
* Installation documentation updated
* Vendor changed to oxid-projects
2017-12-07 09:19:46 +02:00
20 geänderte Dateien mit 451 neuen und 28 gelöschten Zeilen

Datei anzeigen

@ -19,6 +19,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### 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
changed:
- PHP 7.4/8.0 compatibility https://github.com/OXIDprojects/captcha-module/issues/7
- fix metadata version number
## [2.0.3] - 10 Dec 2020
changed: insert Captcha also in the forgotten password form and newsletter subscription
## [2.0.2] - 10 Jan 2020
changed: moved code to its own template file and changed markup to match flow …
## [2.0.1] - 2017-12-07
### Added
- Module available on packagist
## [2.0.0] - 2017-12-05
### Changed

Datei anzeigen

@ -25,8 +25,7 @@ In order to install the module via composer, run the following commands in comma
(where the shop's composer.json file resides).
```
composer config repositories.oxid-esales/captcha-module vcs https://github.com/OXIDprojects/captcha-module
composer require oxid-esales/captcha-module:dev-master
composer require oxid-projects/captcha-module
```
### Module installation via repository cloning

Datei anzeigen

@ -0,0 +1,58 @@
<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
/**
* Article detailed information widget.
*/
class oeUserComponent extends oeUserComponent_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;
}
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()) {
return false;
}
return parent::createUser();
}
}

Datei anzeigen

@ -1,18 +1,3 @@
[{$smarty.block.parent}]
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
<li class="verify">
<label class="req">[{oxmultilang ident="VERIFICATION_CODE" suffix="COLON"}]</label>
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
[{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}]
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="js-oxValidate js-oxValidate_notEmpty">
<p class="oxValidateError">
<span class="js-oxError_notEmpty">[{oxmultilang ident="ERROR_MESSAGE_INPUT_NOTALLFIELDS"}]</span>
</p>
</li>
[{include file="oecaptcha.tpl" labelCssClass="col-lg-2" inputCssClass="col-lg-10"}]

Datei anzeigen

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="oecaptcha_wave.tpl" labelCssClass="control-label col-lg-2" inputCssClass="col-lg-5"}]

Datei anzeigen

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="oecaptcha.tpl" labelCssClass="col-md-3" inputCssClass="col-md-9"}]

Datei anzeigen

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="oecaptcha_wave.tpl" labelCssClass="col-lg-2" inputCssClass="col-lg-5"}]

Datei anzeigen

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="oecaptcha_wave.tpl" labelCssClass="control-label col-lg-2" inputCssClass="col-lg-5"}]

Datei anzeigen

@ -0,0 +1,5 @@
[{$smarty.block.parent}]
[{if !$oxcmp_user}]
[{include file="oecaptcha_wave.tpl" labelCssClass="col-lg-3" inputCssClass="col-lg-5"}]
[{/if}]

Datei anzeigen

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{include file="oecaptcha_wave.tpl" labelCssClass="col-lg-3" inputCssClass="col-lg-8"}]

Datei anzeigen

@ -0,0 +1,21 @@
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
[{if $oCaptcha}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
<div class="form-group verify">
<label class="req control-label [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
<div class="[{$inputCssClass}] controls">
<div class="input-group">
<span class="input-group-addon">
[{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}]
</span>
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
</div>
</div>
</div>
[{/if}]

Datei anzeigen

@ -0,0 +1,21 @@
[{assign var="oCaptcha" value=$oView->getCaptcha()}]
[{if $oCaptcha}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
<div class="form-group row verify">
<label class="req [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
<div class="[{$inputCssClass}]">
<div class="input-group">
<span class="input-group-addon" style="padding-right:15px">
[{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}]
</span>
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
</div>
</div>
</div>
[{/if}]

Datei anzeigen

@ -1,5 +1,5 @@
{
"name": "oxid-esales/captcha-module",
"name": "oxid-projects/captcha-module",
"description": "This is Captcha module for OXID eShop.",
"type": "oxideshop-module",
"keywords": ["oxid", "modules", "eShop", "captcha"],

Datei anzeigen

@ -0,0 +1,29 @@
<?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;
}
}

Datei anzeigen

@ -0,0 +1,44 @@
<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
class oeCaptchaForgotPwd extends oeCaptchaForgotPwd_parent
{
/**
* Class handling CAPTCHA image.
*
* @var object
*/
protected $captcha = null;
/**
* Composes and sends user written message, returns false if some parameters
* are missing.
*
* @return bool
*/
public function forgotpassword()
{
if (!$this->getCaptcha()->passCaptcha()) {
return false;
}
return parent::forgotpassword();
}
/**
* 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;
}
}

Datei anzeigen

@ -0,0 +1,44 @@
<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
class oeCaptchaNewsletter extends oeCaptchaNewsletter_parent
{
/**
* Class handling CAPTCHA image.
*
* @var object
*/
protected $captcha = null;
/**
* Composes and sends user written message, returns false if some parameters
* are missing.
*
* @return bool
*/
public function send()
{
if (!$this->getCaptcha()->passCaptcha()) {
return false;
}
return parent::send();
}
/**
* 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;
}
}

Datei anzeigen

@ -0,0 +1,52 @@
<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
/**
* Article suggestion page.
* Collects some article base information, sets default recomendation text,
* sends suggestion mail to user.
*/
class oeCaptchaRegister extends oeCaptchaRegister_parent
{
/**
* Class handling CAPTCHA image.
*
* @var object
*/
protected $captcha = null;
/**
* Sends product suggestion mail and returns a URL according to
* URL formatting rules.
*
* Template variables:
* <b>editval</b>, <b>error</b>
*
* @return null
*/
public function send()
{
// spam spider prevension
if (!$this->getCaptcha()->passCaptcha()) {
return false;
}
return parent::send();
}
/**
* 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;
}
}

Datei anzeigen

@ -0,0 +1,52 @@
<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
/**
* Article suggestion page.
* Collects some article base information, sets default recomendation text,
* sends suggestion mail to user.
*/
class oeCaptchaUser extends oeCaptchaUser_parent
{
/**
* Class handling CAPTCHA image.
*
* @var object
*/
protected $captcha = null;
/**
* Sends product suggestion mail and returns a URL according to
* URL formatting rules.
*
* Template variables:
* <b>editval</b>, <b>error</b>
*
* @return null
*/
public function send()
{
// spam spider prevension
if (!$this->getCaptcha()->passCaptcha()) {
return false;
}
return parent::send();
}
/**
* 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;
}
}

Datei anzeigen

@ -50,7 +50,7 @@ class oeCaptcha extends oxSuperCfg
if (!$this->text) {
$this->text = '';
for ($i = 0; $i < $this->macLength; $i++) {
$this->text .= strtolower($this->macChars{rand(0, strlen($this->macChars) - 1)});
$this->text .= strtolower($this->macChars[rand(0, strlen($this->macChars) - 1)]);
}
}

Datei anzeigen

@ -17,6 +17,10 @@
/**
* Metadata version
*/
use OxidEsales\Eshop\Application\Component\UserComponent;
use OxidEsales\Eshop\Application\Controller\AccountUserController;
$sMetadataVersion = '1.1';
/**
@ -33,26 +37,89 @@ $aModule = array(
'en' => 'OXID eSales Simple Captcha Module',
),
'thumbnail' => 'out/pictures/picture.png',
'version' => '2.0.0',
'version' => '2.0.9',
'author' => 'OXID eSales AG',
'url' => 'http://www.oxid-esales.com/',
'url' => 'https://www.oxid-esales.com/',
'email' => '',
'extend' => array('details' => 'oe/captcha/controllers/oecaptchadetails',
'contact' => 'oe/captcha/controllers/oecaptchacontact',
'forgotpwd' => 'oe/captcha/controllers/oecaptchaforgotpwd',
'invite' => 'oe/captcha/controllers/oecaptchainvite',
'newsletter' => 'oe/captcha/controllers/oecaptchanewsletter',
'pricealarm' => 'oe/captcha/controllers/oecaptchapricealarm',
'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',
'register' => 'oe/captcha/controllers/oecaptcharegister',
'user' => 'oe/captcha/controllers/oecaptchauser',
AccountUserController::class => 'oe/captcha/controllers/oecaptchaaccountuser'
),
'files' => array(
'oecaptcha' => 'oe/captcha/core/oecaptcha.php',
'oecaptchaEvents' => 'oe/captcha/core/oecaptchaevents.php',
),
'templates' => array(),
'templates' => array(
'oecaptcha.tpl' => 'oe/captcha/application/views/tpl/oecaptcha.tpl',
'oecaptcha_wave.tpl' => 'oe/captcha/application/views/tpl/oecaptcha_wave.tpl',
),
'blocks' => array(
array('template' => 'form/contact.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),
array('template' => 'form/privatesales/invite.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),
array('template' => 'form/pricealarm.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),
array('template' => 'form/suggest.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),
array('template' => 'form/contact.tpl',
'block'=>'captcha_form',
'theme' => 'flow',
'file'=>'/application/views/blocks/captcha_form.tpl'),
array('template' => 'form/newsletter.tpl',
'block'=>'captcha_form',
'theme' => 'flow',
'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',
'block'=>'captcha_form',
'theme' => 'wave',
'file'=>'/application/views/blocks/captcha_form_contact_wave.tpl'),
array('template' => 'form/newsletter.tpl',
'block'=>'captcha_form',
'theme' => 'wave',
'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(
array('group' => 'main', 'name' => 'oecaptchakey', 'type' => 'str', 'value' => ''),