8
0
Mirror von https://git.d3data.de/3rdParty/captcha-module.git synchronisiert 2025-04-29 17:21:34 +02:00

Commits vergleichen

..

6 Commits

20 geänderte Dateien mit 39 neuen und 49 gelöschten Zeilen

Datei anzeigen

@ -1,23 +1,12 @@
# Change Log for OE Tags Module
# Change Log for OE Captcha Module
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
## 2.0.10 - 15 Januar 2025
- change PHP 7 incompatible code
- exclude registration in checkout step 2 from captcha check
## 2.0.9 - 25 Juni 2024
- add check $oCaptcha in templates

Datei anzeigen

@ -19,7 +19,7 @@ request (e.g. send contact mail to shop administrator) or refuse and show an err
Please proceed with one of the following ways to install the module:
### Module installation via composer
### Module installation
In order to install the module via composer, run the following commands in commandline of your shop base directory
(where the shop's composer.json file resides).
@ -28,22 +28,44 @@ In order to install the module via composer, run the following commands in comma
composer require oxid-projects/captcha-module
```
### Module installation via repository cloning
### Adjustments of shop theme
Depending of the installed theme, required tpl blocks may be missing. Please add the missing blocks (as described in metadata.php) to the shop theme templates.
Exceptions:
`tpl/form/fieldset/user_billing.tpl` - wrap block with this condition:
Clone the module to your OXID eShop **modules/oe/** directory:
```
git clone https://github.com/OXIDprojects/captcha-module.git captcha
[{if $blIsRegister == true}]
[{block name="captcha_form"}][{/block}]
[{/if}]
```
### Module installation from zip package
`tpl/form/register.tpl` - insert the variable to the include command:
* Make a new folder "captcha" in the **modules/oe/ directory** of your shop installation.
* Download the https://github.com/OXIDprojects/captcha-module/archive/master.zip file and unpack it into the created folder.
```
[{include file="form/fieldset/user_billing.tpl" blIsRegister=true}]
```
## Activate Module
- Activate the module in the administration panel.
## Occurrences (test cases)
- from user_billing.tpl block extension
- form/user_checkout_noregistration.tpl
- checkout/user.tpl (no login && order without account)
- form/user_checkout_registration.tpl
- checkout/user.tpl (no login && create account)
- form/user_checkout_change.tpl
- checkout/user.tpl (logged in)
- form/register.tpl
- page/account/register.tpl
- form/user.tpl
- page/account/user.tpl
- ... to be continued
## Uninstall
Disable the module in administration area and delete the module folder.

Datei anzeigen

@ -36,20 +36,20 @@ class oeUserComponent extends oeUserComponent_parent
$trace = ob_get_contents();
ob_end_clean();
if(str_contains($trace, 'initAmazonPayExpress'))
if(strpos($trace, 'initAmazonPayExpress') !== false)
{
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')
if(\OxidEsales\Eshop\Core\Registry::getRequest()->getRequestEscapedParameter('fnc') == 'approveOrder')
{
return parent::createUser();
}
/* START check for PayPal Checkout - no Captcha */
if (!$this->getCaptcha()->passCaptcha()) {
if (\OxidEsales\Eshop\Core\Registry::getRequest()->getRequestEscapedParameter('cl') !== 'user' && !$this->getCaptcha()->passCaptcha()) {
return false;
}

Datei anzeigen

@ -9,7 +9,7 @@
<div class="input-group">
<span class="input-group-addon">
[{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getBase64Image()}]" alt="">
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}]

Datei anzeigen

@ -9,7 +9,7 @@
<div class="input-group">
<span class="input-group-addon" style="padding-right:15px">
[{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getBase64Image()}]" alt="">
<img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}]

Datei anzeigen

@ -12,8 +12,5 @@
"oxideshop": {
"target-directory": "oe/captcha"
}
},
"require": {
"mobicms/captcha": "^4.0"
}
}

Datei anzeigen

@ -4,8 +4,6 @@
*/
use OxidEsales\Eshop\Core\DatabaseProvider;
use Mobicms\Captcha\Image;
use Mobicms\Captcha\ImageOptions;
/**
* Class handling CAPTCHA image
@ -126,20 +124,6 @@ class oeCaptcha extends oxSuperCfg
return $url;
}
public function getBase64Image()
{
$fontsPath = __DIR__ . '/../fonts';
$img = new Image($this->getText(), (new ImageOptions())->setFontsFolder($fontsPath)->setHeight(45)
->setWidth(160)
->adjustFont('baby_blocks.ttf', 13)
->adjustFont('ball.ttf', 20)
->adjustFont('chintzy.ttf', 18)
->adjustFont('platinumhubcapsspoked.ttf', 20)
->adjustFont('subway.ttf', 20)
);
return (string) $img;
}
/**
* Checks if image could be generated
*

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -1,2 +0,0 @@
Developer: Ryan D. Neaveill
License: Unknown

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -37,7 +37,7 @@ $aModule = array(
'en' => 'OXID eSales Simple Captcha Module',
),
'thumbnail' => 'out/pictures/picture.png',
'version' => '2.0.9',
'version' => '2.0.10',
'author' => 'OXID eSales AG',
'url' => 'https://www.oxid-esales.com/',
'email' => '',