This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Install dependencies with npm: | |
* npm i ftp | |
* npm i util-promisifyall | |
*/ | |
const promisifyAll = require('util-promisifyall'); | |
const Client = require('ftp'); | |
/** | |
* CONFIGURE YOUR OWN FTP ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Due to best practices, we need to create a new service which is used by the ImageListener. | |
Its role is to upload files and generate an unique filename. | |
NOTA: | |
The default $uploadPath is autowired by argument binding inside services.yaml | |
but in this case, we override it with the $path argument of the upload method. | |
*/ | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use Doctrine\Common\Annotations\Reader; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Mapping\Id; | |
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; | |
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Block base64 injections | |
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] | |
# Block out any script that includes a <script> tag in URL. | |
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] | |
# Block out any script trying to set a PHP GLOBALS variable via URL. | |
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] | |
# Block out any script trying to modify a _REQUEST variable via URL. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author - Mobiloweb - Anthony Cecconato | |
* @version 1.0 | |
* @cms Prestashop | |
* @ps_version 1.7+ | |
* | |
* Delete old users, without orders (+12month by default) by getting the /yoururl/cron/delete_old_users.php?s_key=SECRET url | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cart_default:125x125 | |
small_default:98x98 | |
medium_default:452x452 | |
home_default:250x250 | |
large_default:800x800 | |
default_xs:120x120 | |
default_s:160x160 | |
default_m:200x200 | |
default_md:320x320 | |
default_xl:400x400 |