This commit is contained in:
Dennis Eichhorn 2024-01-02 23:34:17 +00:00
parent 2b1be588ea
commit 6ba73f88b0
5 changed files with 23 additions and 5 deletions

View File

@ -46,6 +46,7 @@
<exclude-pattern>*Sha1.js</exclude-pattern>
<exclude-pattern>*Sha1b.js</exclude-pattern>
<exclude-pattern>[abcdef0-9]{32}/*</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<arg value="q"/>
<arg name="colors"/>
<arg name="tab-width" value="4"/>
@ -148,6 +149,7 @@
<exclude name="PEAR.Commenting.ClassComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.ClassComment.InvalidVersion"/>
<exclude name="PEAR.Commenting.ClassComment.DuplicateLicenseTag"/>
</rule>
<rule ref="PEAR.Commenting.FunctionComment">
<severity>7</severity>

View File

@ -14,6 +14,7 @@ parameters:
treatPhpDocTypesAsCertain: false
excludePaths:
- *.tpl.php
- *.min.js
- */Modules/Media/Files/*
- */omsSetup/*
- */demoSetup/*

View File

@ -61,10 +61,15 @@ return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->skip([
$base . '/vendor',
'*/vendor',
'*/node_modules',
$base . '/privateSetup',
$base . '/demoSetup',
$base . '/Build',
$base . '/MainRepository',
$base . '/Resources',
$base . '/Tools',
$base . '/Sandbox',
$base . '/cssOMS',
'*/Admin/Install/Application',
SimplifyEmptyCheckOnEmptyArrayRector::class,

View File

@ -7,19 +7,19 @@ echo "#################################################"
echo "# PHP strict"
echo "#################################################"
grep -r -L "declare(strict_types=1);" --include=*.php --exclude-dir={*vendor*,*Files*,*privateSetup*,*demoSetup*,*LanguageDetection*,*Resources*,*node_modules*,*privateSetup*,*Build*} --exclude={*.tpl.php,*Hooks.php,*Routes.php,*SearchCommands.php} ${BPATH}/../../phpOMS ${BPATH}/../../Web ${BPATH}/../../Modules ${BPATH}/../../Model
grep -r -L "declare(strict_types=1);" --include=*.php --exclude-dir={*vendor*,*Files*,*privateSetup*,*demoSetup*,*LanguageDetection*,*Resources*,*node_modules*,*privateSetup*,*Build*} --exclude={*.tpl.php,*Hooks.php,*Routes.php,*SearchCommands.php} ${BPATH}/../../../phpOMS ${BPATH}/../../../Web ${BPATH}/../../../Modules ${BPATH}/../../../Model
echo "#################################################"
echo "# JS security inspection"
echo "#################################################"
grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ${BPATH}/../../jsOMS ${BPATH}/../../Model ${BPATH}/../../Modules ${BPATH}/../../Web
grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ${BPATH}/../../../jsOMS ${BPATH}/../../../Model ${BPATH}/../../../Modules ${BPATH}/../../../Web
echo "#################################################"
echo "# PHPCS"
echo "#################################################"
./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"
./vendor/bin/phpcs -s --severity=1 ./ --standard="Build/Config/phpcs.xml"
echo "#################################################"
echo "# PHP static inspection"

View File

@ -67,14 +67,24 @@ mysql -u root -p
CREATE USER 'jingga'@'%' IDENTIFIED BY 'dYg8#@wLiWJ3vE';
CREATE USER 'demo'@'%' IDENTIFIED BY 'orange';
CREATE USER 'test'@'%' IDENTIFIED BY 'orange';
CREATE USER 'build'@'%' IDENTIFIED BY 'orange';
# website
CREATE DATABASE jingga';
CREATE DATABASE demo';
# demo
CREATE DATABASE omd';
# test
CREATE DATABASE omt';
# build
CREATE DATABASE omb';
GRANT ALL PRIVILEGES ON jingga.* TO 'jingga'@'%';
GRANT ALL PRIVILEGES ON demo.* TO 'demo'@'%';
GRANT ALL PRIVILEGES ON omd.* TO 'demo'@'%';
GRANT ALL PRIVILEGES ON omt.* TO 'test'@'%';
GRANT ALL PRIVILEGES ON omb.* TO 'build'@'%';
FLUSH PRIVILEGES;