1
0
mirror of https://github.com/hestiacp/hestiacp.git synced 2025-02-06 10:24:04 +00:00

Add EOL to a bunch of files (#4530)

* prettier complain if not end with newline

* a bunch of newlines.

the newlines were created with the following script:
<?php

declare(strict_types=1);

$dir = realpath(__DIR__ . '/..');
chdir($dir);
foreach ((new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS))) as $file) {
    if ($file->isDir()) {
        continue;
    }
    if ($file->isLink()) {
        continue;
    }
    $size = $file->getSize();
    if ($size === 0) {
        continue;
    }
    $path = $file->getPathname();
    $blacklist = array(
        '/.git/',
        '/node_modules/',
        '/vendor/',
        'rex:/\\.svg$/i'
    );
    foreach ($blacklist as $pattern) {
        $isBlacklisted = str_starts_with($pattern, 'rex:') ? preg_match(substr($pattern, strlen('rex:')), $path) : str_contains($path, $pattern);
        if ($isBlacklisted) {
            continue 2;
        }
    }
    $content = file_get_contents($path);
    // is binary?
    if(strlen($content) !== strcspn($content, "\x00\x01\x02\x03\x04\x05\x06\x07\x08")) {
        //var_dump("skipping binary file: {$path}");
        continue;
    }
    $lastByte = substr($content, -1);
    if ($lastByte === "\n") {
        continue;
    }
    var_dump($path, $lastByte);
    $content .= "\n";
    file_put_contents($path, $content, LOCK_EX);
}
?>

* prettier fix
This commit is contained in:
divinity76 2024-08-24 07:29:48 +02:00 committed by GitHub
parent 9ce0b51498
commit c68f540d8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 42 additions and 40 deletions

View File

@ -9,6 +9,8 @@ module.exports = {
// PHP Settings
phpVersion: '8.2',
braceStyle: '1tbs',
endOfLine: 'lf',
// Overrides for some files
overrides: [
// JavaScript files

View File

@ -85,4 +85,4 @@ protocol sieve {
#log_path = /var/log/dovecot-sieve-errors.log
#info_log_path = /var/log/dovecot-sieve.log
}
}

View File

@ -41,4 +41,4 @@ plugin {
# user = vmail
# mode = 0600
#}
#}
#}

View File

@ -19,4 +19,4 @@ ID='18' RECORD='enterpriseenrollment' TYPE='CNAME' PRIORITY='' VALUE='enterprise
ID='19' RECORD='_sip._tls' TYPE='SRV' PRIORITY='100' VALUE='1 443 sipdir.online.lync.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='20' RECORD='_sipfederationtls._tcp' TYPE='SRV' PRIORITY='100' VALUE='1 5061 sipfed.online.lync.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='21' RECORD='login' TYPE='CNAME' PRIORITY='' VALUE='login.microsoftonline.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='22' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='mail.office365.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='22' RECORD='mail' TYPE='CNAME' PRIORITY='' VALUE='mail.office365.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'

View File

@ -12,4 +12,4 @@ ID='11' RECORD='www' TYPE='CNAME' PRIORITY='' VALUE='%domain%.' SUSPENDED='no' T
ID='12' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mx.zoho.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='13' RECORD='@' TYPE='MX' PRIORITY='20' VALUE='mx2.zoho.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='14' RECORD='@' TYPE='MX' PRIORITY='50' VALUE='mx3.zoho.com.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% include:zoho.com -all"' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='15' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% include:zoho.com -all"' SUSPENDED='no' TIME='%time%' DATE='%date%'

View File

@ -2,4 +2,4 @@
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
</IfModule>
</IfModule>

View File

@ -21,4 +21,4 @@ options {
hostname none;
server-id none;
version none;
};
};

View File

@ -1 +1 @@
200
200

View File

@ -13,4 +13,4 @@ then
headers remove "Subject"
headers add "Subject: *** VIRUS *** $h_old-subject"
headers remove "Old-Subject"
endif
endif

View File

@ -6,4 +6,4 @@ actionstart = /usr/local/hestia/bin/v-add-firewall-chain <name>
actionstop = /usr/local/hestia/bin/v-delete-firewall-chain <name>
actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-<name>[ \t]'
actionban = /usr/local/hestia/bin/v-add-firewall-ban <ip> <name>
actionunban = /usr/local/hestia/bin/v-delete-firewall-ban <ip> <name>
actionunban = /usr/local/hestia/bin/v-delete-firewall-ban <ip> <name>

View File

@ -9,4 +9,4 @@
postrotate
doveadm log reopen
endscript
}
}

View File

@ -4,4 +4,4 @@
missingok
notifempty
create 0600 root root
}
}

View File

@ -4,4 +4,4 @@
missingok
notifempty
create 644 www-data www-data
}
}

View File

@ -48,4 +48,4 @@
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -45,4 +45,4 @@
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -9,4 +9,4 @@ SSLVerifyClient none
SSLCertificateFile %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.crt
SSLCertificateKeyFile %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.key
</VirtualHost>
</VirtualHost>

View File

@ -4,4 +4,4 @@
DocumentRoot /var/www/html/
Alias /error/ /var/www/document_errors/
#SuexecUserGroup %user% %group%
</VirtualHost>
</VirtualHost>

View File

@ -28,4 +28,4 @@ SSLCertificateKeyFile %home%/%user%/conf/mail/%root_domain%/ssl/%root_domai
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -22,4 +22,4 @@
AllowOverride None
</Directory>
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -21,4 +21,4 @@ options {
hostname none;
server-id none;
version none;
};
};

View File

@ -3,4 +3,4 @@ name=Dovecot 2.3-latest RHEL $releasever - $basearch
baseurl=https://repo.dovecot.org/ce-2.3-latest/rhel/$releasever/RPMS/$basearch
gpgkey=https://repo.dovecot.org/DOVECOT-REPO-GPG
gpgcheck=1
enabled=1
enabled=1

View File

@ -6,4 +6,4 @@ actionstart = /usr/local/hestia/bin/v-add-firewall-chain <name>
actionstop = /usr/local/hestia/bin/v-delete-firewall-chain <name>
actioncheck = iptables -n -L INPUT | grep -q 'fail2ban-<name>[ \t]'
actionban = /usr/local/hestia/bin/v-add-firewall-ban <ip> <name>
actionunban = /usr/local/hestia/bin/v-delete-firewall-ban <ip> <name>
actionunban = /usr/local/hestia/bin/v-delete-firewall-ban <ip> <name>

View File

@ -3,4 +3,4 @@ name=HestiaCP Repository for RHEL $releasever - $basearch
baseurl=https://rpm.hestiacp.com/rhel/$releasever/$basearch/
gpgkey=https://rpm.hestiacp.com/RPM-GPG-KEY-HESTIACP
gpgcheck=1
enabled=1
enabled=1

View File

@ -2,4 +2,4 @@
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
</IfModule>
</IfModule>

View File

@ -9,4 +9,4 @@
postrotate
doveadm log reopen
endscript
}
}

View File

@ -4,4 +4,4 @@
missingok
notifempty
create 0600 root root
}
}

View File

@ -7,4 +7,4 @@
/sbin/service httpd reload > /dev/null 2>/dev/null || true
[ ! -f /run/nginx.pid ] || kill -USR1 `cat /run/nginx.pid`
endscript
}
}

View File

@ -4,4 +4,4 @@
missingok
notifempty
create 644 www-data www-data
}
}

View File

@ -4,4 +4,4 @@ baseurl = https://ftp.osuosl.org/pub/mariadb/yum/10.6/rhel$releasever-$basearch
module_hotfixes=1
gpgkey=https://ftp.osuosl.org/pub/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
enabled=1
enabled=1

View File

@ -4,4 +4,4 @@ baseurl = https://ftp.osuosl.org/pub/mariadb/yum/10.6/rhel$releasever-amd64
module_hotfixes=1
gpgkey=https://ftp.osuosl.org/pub/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
enabled=1
enabled=1

View File

@ -4,4 +4,4 @@ baseurl = http://repo.mysql.com/yum/mysql-8.0-community/el/$releasever/$basearch
module_hotfixes=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
gpgcheck=1
enabled=1
enabled=1

View File

@ -3,4 +3,4 @@ name=Nginx Repository for RHEL $releasever - $basearch
baseurl=https://nginx.org/packages/rhel/$releasever/$basearch/
gpgkey=https://nginx.org/keys/nginx_signing.key
gpgcheck=1
enabled=1
enabled=1

View File

@ -23,4 +23,4 @@ php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/%user%/tmp
env[TMPDIR] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp

View File

@ -50,4 +50,4 @@
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -45,4 +45,4 @@
IncludeOptional %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*
</VirtualHost>
</VirtualHost>

View File

@ -24,4 +24,4 @@ env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/%user%/tmp
env[TMPDIR] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp

View File

@ -24,4 +24,4 @@
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /home/%user%/tmp
;env[TMPDIR] = /home/%user%/tmp
;env[TEMP] = /home/%user%/tmp
;env[TEMP] = /home/%user%/tmp

View File

@ -24,4 +24,4 @@ env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/%user%/tmp
env[TMPDIR] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp

View File

@ -148,4 +148,4 @@ function setup() {
@test "[Success][ Hash ] Delete user" {
run curl -k -s -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "hash=$apikey&cmd=v-delete-user&arg1=hestiatest" "https://$server:$port/api/index.php"
}
}

View File

@ -385,4 +385,4 @@ r' "key"
1eshutdown
r' "key"
assert_failure $E_INVALID
}
}

View File

@ -1,2 +1,2 @@
User-agent: *
Disallow: /
Disallow: /