Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: master to development #1

Open
wants to merge 488 commits into
base: development
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
488 commits
Select commit Hold shift + click to select a range
b20aa86
Merge pull request #4757 from pi-hole/4751-unable-to-locate-php00-common
yubiuser Jun 15, 2022
954a0c2
Remove read permission for others on senible log files
yubiuser Jun 19, 2022
2c5907a
Requiere sudo for pihole -t
yubiuser Jun 19, 2022
f9d1893
Update test to reflect currently supported OS
yubiuser Jun 20, 2022
287d5d3
Add stale-issue-reason: not planned
yubiuser Jun 24, 2022
d88ab2c
Remove unnecassry file types from editorconfig
yubiuser Jun 24, 2022
3d773be
Merge pull request #4769 from pi-hole/tweak/editorconfig
yubiuser Jun 25, 2022
8c498ac
Re-add Ubuntu21 tests
yubiuser Jun 25, 2022
a33f712
Re-add centos_7
yubiuser Jun 25, 2022
f740e0f
Ubt22 is jammy not impish
yubiuser Jun 25, 2022
7ef7719
Merge pull request #4761 from pi-hole/re_sudo
PromoFaux Jun 26, 2022
bacb98b
Merge pull request #4767 from pi-hole/stale_reason
PromoFaux Jun 26, 2022
f3d062a
Merge pull request #4770 from pi-hole/master
PromoFaux Jun 26, 2022
e02c7ff
Merge pull request #4760 from pi-hole/hands_off
yubiuser Jun 26, 2022
dcea3cf
Merge branch 'development' into drop_fedora
dschaper Jun 27, 2022
46331e4
Merge pull request #4762 from pi-hole/drop_fedora
yubiuser Jun 28, 2022
b70b895
Add mkdown and yaml linters to stickler
yubiuser Jun 29, 2022
eb045a0
Merge pull request #4773 from pi-hole/yamllint_and_mkdownlint
yubiuser Jul 1, 2022
73d5902
Add editorconfig-checker workflow
yubiuser Jun 26, 2022
75f40e7
Merge pull request #4771 from pi-hole/action/ediorconfig-checker
PromoFaux Jul 2, 2022
0be9872
Adds spellcheck action to the smoke-tests (also moves editorconfig-ch…
PromoFaux Jul 2, 2022
1748502
Merge pull request #4713 from pi-hole/new/code-spell
yubiuser Jul 2, 2022
a783da8
Run stale workflow at 8:00 once per day
yubiuser Jul 3, 2022
312fa6d
Merge pull request #4776 from pi-hole/less_stale
DL6ER Jul 3, 2022
98c2380
Change FTL's default log file path from /var/log/pihole/pihole-FTL.lo…
DL6ER Jul 3, 2022
bd8288d
Special renaming for pihole-FTL.* to pihole/FTL.log.*
DL6ER Jul 3, 2022
80bef5f
Direct pull for epel-release
dschaper Jul 3, 2022
37889f2
Merge pull request #4775 from pi-hole/fix/centos_epel
yubiuser Jul 3, 2022
bf57a78
Convert whiptail to dialog.
Jun 19, 2022
1ed5ff3
Align dialog texts.
dschaper Jul 2, 2022
a650641
Change tests to mock dialog
dschaper Jul 2, 2022
2845c72
Add testing dependencies for CentOS7 and dialog
dschaper Jul 3, 2022
6efb3a3
Fix for epel mirror timeouts
dschaper Jul 3, 2022
c78aac3
Merge pull request #4778 from pi-hole/fix/epel_mirrors
dschaper Jul 3, 2022
0b10c50
Merge branch 'development' into tweak/dialog
dschaper Jul 3, 2022
696d1c4
Merge pull request #4777 from pi-hole/tweak/default_log_path
yubiuser Jul 3, 2022
44667b5
Add dialog to RPM installer requirements.
dschaper Jul 4, 2022
72fcdb1
Rework cenos7 functions
dschaper Jul 4, 2022
a39c470
Requested changes.
dschaper Jul 5, 2022
c058a51
Fix close-issue-reason
yubiuser Jul 5, 2022
39cb102
Clarify button labels
dschaper Jul 5, 2022
ad70ece
Fixing dialog line breaks
rdwebdesign Jul 6, 2022
46f991f
Apply suggestions from code review
dschaper Jul 6, 2022
cfbc731
Apply suggestions from code review
dschaper Jul 6, 2022
853cd96
Merge pull request #4772 from pi-hole/tweak/dialog
dschaper Jul 6, 2022
5c564e5
Fix indention in install script output
yubiuser Jul 6, 2022
469776a
Do not restrict RegEx added from CLI by length
yubiuser Jul 6, 2022
4150826
Merge pull request #4784 from pi-hole/space
PromoFaux Jul 6, 2022
e05b64b
Merge pull request #4782 from pi-hole/fix/stale_reason
PromoFaux Jul 6, 2022
3d4476c
Merge pull request #4786 from pi-hole/regex_lenght
yubiuser Jul 6, 2022
0a8761e
Rename PH_TEST to SKIP_INSTALL
yubiuser Jul 6, 2022
518cbd1
Rename also in docker files
yubiuser Jul 6, 2022
edba325
Disable line length rule for yamllint - fix indentation in stale.yml
PromoFaux Jul 7, 2022
6204698
Merge pull request #4790 from pi-hole/reformat-yml
PromoFaux Jul 7, 2022
1be082a
Merge pull request #4789 from pi-hole/development
PromoFaux Jul 7, 2022
fd41801
Create new log directory
dschaper Jul 7, 2022
04abc4d
Merge pull request #4792 from pi-hole/fix/mkdir_logs
PromoFaux Jul 7, 2022
48d5d6b
Always create the log target directory before any movements
dschaper Jul 7, 2022
ef71ca0
Merge pull request #4794 from pi-hole/fix/mkdir_always
dschaper Jul 7, 2022
56a3204
Logic fix
dschaper Jul 7, 2022
a28d691
Merge pull request #4795 from pi-hole/fix/mkdir_always
dschaper Jul 7, 2022
edc808e
Merge pull request #4791 from pi-hole/master
yubiuser Jul 7, 2022
b49db58
Fix spelling mistakes
yubiuser Jul 8, 2022
3d8672b
Clean consecutive mkdir
yubiuser Jul 8, 2022
7d5f6c8
Merge pull request #4804 from pi-hole/mkdir
yubiuser Jul 8, 2022
6aaa446
Merge pull request #4802 from pi-hole/codespell
yubiuser Jul 8, 2022
8e4adb6
Merge pull request #4788 from pi-hole/SKIP_INSTALL
yubiuser Jul 8, 2022
e4444ae
fixes "Set static IP using custom values results in error" (#4807)
PromoFaux Jul 9, 2022
e0baf4c
Merge pull request #4808 from pi-hole/cure/cancer
PromoFaux Jul 9, 2022
ecfb96d
If old log paths exist in logrotate file, replace them with new ones
PromoFaux Jul 10, 2022
59dab6a
Simplifications per @yubiuser's suggestion
PromoFaux Jul 10, 2022
d6c48f8
Merge pull request #4810 from pi-hole/tweak/logrotate
yubiuser Jul 10, 2022
b258053
Print all SELINUX output in lowercase
yubiuser Jul 10, 2022
9f91897
Adjust tests
yubiuser Jul 10, 2022
1313549
Merge pull request #4811 from pi-hole/CAPS
PromoFaux Jul 10, 2022
aefbe1f
Merge pull request #4812 from pi-hole/development
PromoFaux Jul 10, 2022
3dd26b5
Merge pull request #4813 from pi-hole/master
PromoFaux Jul 10, 2022
b486786
Add database healthy checks to debug script
yubiuser May 29, 2022
71d310c
Merge pull request #4745 from pi-hole/tweak/debug
yubiuser Jul 10, 2022
c4f9a47
Debug log - add spinner for long processes
rdwebdesign Jul 11, 2022
cbcd126
Adding the spinner for foreign_key_check too
rdwebdesign Jul 11, 2022
64d75c0
Merge pull request #4815 from pi-hole/debug_spinner
yubiuser Jul 11, 2022
a3f1317
Don't fail if Alma or Rocky is detected
yubiuser Jul 15, 2022
bc8fcc7
Fix shellcheck warnings
yubiuser Jul 15, 2022
b025cfe
Merge pull request #4825 from pi-hole/shellcheck_install
yubiuser Jul 16, 2022
c7108a6
Merge pull request #4824 from pi-hole/Alam_Rocky
yubiuser Jul 16, 2022
8d1f286
Only execute spinner function if there is a tty
rdwebdesign Jul 24, 2022
d897203
Address revision requests:
rdwebdesign Jul 24, 2022
2bd3366
Disable fail fast, allowing tests to run despite failures on a partic…
PromoFaux Jul 25, 2022
21af75a
Ubuntu 21 tests are failing entirely. apt-update does not work on an …
PromoFaux Jul 25, 2022
a7a467a
Merge pull request #4837 from pi-hole/dont-fail-fast
PromoFaux Jul 25, 2022
27ef7e5
Merge branch 'development' into fix/spinner
yubiuser Jul 26, 2022
f59749b
Merge pull request #4834 from pi-hole/fix/spinner
yubiuser Jul 26, 2022
6446551
prefers-color-scheme for logo
yubiuser Jul 26, 2022
7b77d99
Move FTL port and PID functions to utils.sh
yubiuser Jul 26, 2022
2651abb
Add tests
yubiuser Jul 26, 2022
c8c4eb5
Add getFTLPID() tests
yubiuser Jul 26, 2022
ab6b37b
Fix stickler and codefactor complaints
yubiuser Jul 26, 2022
14e1eea
Fix spaces in dialog msg
yubiuser Jul 24, 2022
d5c798d
Apply reviewers suggestion
yubiuser Jul 24, 2022
8c778c1
Move linebreaks
yubiuser Jul 26, 2022
cca5c49
Merge pull request #4838 from pi-hole/tweak/readme_logo
yubiuser Jul 26, 2022
aeb9241
Merge pull request #4832 from pi-hole/fix/msg
yubiuser Jul 26, 2022
68eddd2
Add OS_CHECK_DEPS to uninstall script
yubiuser Jul 29, 2022
567a915
Remove unused and outdated files and scripts
yubiuser Jul 29, 2022
2610739
Indent installation/update complete message
yubiuser Jul 29, 2022
b3ba17b
Merge pull request #4846 from pi-hole/uninstall
yubiuser Jul 29, 2022
a45c9f9
Merge pull request #4848 from pi-hole/indent_update
yubiuser Jul 30, 2022
e29aa4e
First things first...
PromoFaux Jul 19, 2022
9c03915
Remove special Centos7 hand holds. Move the unsupported dialog out to…
PromoFaux Jul 19, 2022
b613758
rename select_rpm_php and simplify it to remove code no longer needed…
PromoFaux Jul 30, 2022
fc2a564
remove tests no longer needed
PromoFaux Jul 30, 2022
2c38de2
Merge pull request #4847 from pi-hole/remove/unused_files
yubiuser Jul 30, 2022
313c0dd
Update automated install/basic-install.sh
PromoFaux Jul 30, 2022
0e8c1ec
Flip logic on epel check - if _not_ fedora, then (try to, depending o…
PromoFaux Jul 30, 2022
9028898
Move code from `check_epel_repo_required` into the rpm branch of the …
PromoFaux Jul 30, 2022
aa0a9e2
Merge pull request #4839 from pi-hole/move_getFTLPIDFile
yubiuser Jul 30, 2022
99b7f99
Explicite set minor and patch version on used actions
yubiuser Jul 24, 2022
8f3e6f1
CodeQl does not use .minor.patch version
yubiuser Jul 24, 2022
a3ac1ca
Update actions to latest versions
yubiuser Jul 25, 2022
c6da627
Move release version check inside the else block
PromoFaux Jul 31, 2022
71bc237
Merge pull request #4828 from pi-hole/centos7-can-do-one
PromoFaux Jul 31, 2022
21158cb
Merge pull request #4833 from pi-hole/workflow_versions
PromoFaux Aug 1, 2022
6c7a28a
Dont use bash keywords/programs as variable names
PromoFaux Aug 1, 2022
64dc002
Same per @rdwebdesign suggestion.
PromoFaux Aug 1, 2022
0b81dd3
type -> list_type per @yubiuser suggestion
PromoFaux Aug 1, 2022
3cdaad0
Merge pull request #4851 from pi-hole/keywords
yubiuser Aug 1, 2022
3327df8
Ensure user defined FTL_PID_FILE and FTL_PORT_FILE dirs are created o…
yubiuser Aug 4, 2022
4a58928
Merge pull request #4855 from pi-hole/fix/dir_not_exist
yubiuser Aug 4, 2022
989c52e
Exit with return code if ftl does not start
dschaper Aug 5, 2022
6062df0
Bump actions/stale from 5.1.0 to 5.1.1
dependabot[bot] Aug 6, 2022
e50438d
Bump actions/setup-python from 4.1.0 to 4.2.0
dependabot[bot] Aug 6, 2022
f2641fb
Merge pull request #4861 from pi-hole/dependabot/github_actions/devel…
PromoFaux Aug 6, 2022
aef3d89
Merge pull request #4860 from pi-hole/dependabot/github_actions/devel…
PromoFaux Aug 6, 2022
9e2e001
Bump actions-ecosystem/action-add-labels from 1.1.0 to 1.1.3
dependabot[bot] Aug 6, 2022
a351647
Merge pull request #4859 from pi-hole/dependabot/github_actions/devel…
PromoFaux Aug 6, 2022
f418481
Add security-related headers to Pi-hole web interface
DL6ER Aug 6, 2022
7320c10
Fix git indention
yubiuser Aug 6, 2022
20c561c
Merge pull request #4857 from pi-hole/4856-init-script-ftl
dschaper Aug 6, 2022
c7410b0
Always indent
yubiuser Aug 7, 2022
d38fcb0
Merge pull request #4863 from pi-hole/fix/git_indention
yubiuser Aug 7, 2022
d776773
Extend FTL information in debug log
yubiuser Aug 8, 2022
c78cf82
no need to declare $viewPort
PromoFaux Oct 5, 2021
5d5a85b
X-Pi-hole removed from blocking page...
PromoFaux Oct 5, 2021
5816f49
Fix test_installPiholeWeb_fresh_install_no_errors and test_installPih…
PromoFaux Jul 26, 2022
6c9bd7a
Remove blockingpage.css
yubiuser Jul 26, 2022
b98e331
Only do one curl call in debug when checking the X-Header
yubiuser Jul 26, 2022
27fa284
Fix missing PI_HOLE_BLOCKPAGE_DIR
yubiuser Jul 26, 2022
e668380
Use absolut asset paths
yubiuser Jul 27, 2022
49a9f6f
Reproduce blockpage.css for $splashPage
yubiuser Jul 27, 2022
c67f313
Apply reviewers suggestion for inline CSS
yubiuser Jul 29, 2022
97447b2
Do not remove blockingpage.css from existing installations as some us…
yubiuser Jul 26, 2022
e35a9da
Remove the blockpage-focussed customisations to query.sh
PromoFaux Aug 8, 2022
a0419bc
Merge pull request #4864 from pi-hole/debug_FTL_branch
yubiuser Aug 8, 2022
b3c8045
Skip web server dialog if --disable-install-webserver has been passed
MichaIng Jul 28, 2022
114f562
Merge branch 'development' into removeblockpagefunctionality
PromoFaux Aug 17, 2022
5a98fa1
Merge pull request #4843 from MichaIng/patch-1
yubiuser Aug 17, 2022
37102e5
Merge branch 'development' into removeblockpagefunctionality
yubiuser Aug 17, 2022
9ab5668
Merge pull request #3910 from pi-hole/removeblockpagefunctionality
PromoFaux Aug 17, 2022
8c4a9aa
Remove the email function
yubiuser Aug 17, 2022
4cf3280
Merge pull request #4862 from pi-hole/tweak/lighttpd_headers
yubiuser Aug 18, 2022
eeccfb2
Remove it also from index.php together with more unused variables
yubiuser Aug 20, 2022
5421aad
Store versions as key/value pairs rather than space delimeted values
PromoFaux Aug 22, 2022
a4b899c
Review suggestions (and shellcheck complaints)
PromoFaux Aug 23, 2022
597c045
Merge pull request #4875 from pi-hole/tweak/version-file
PromoFaux Aug 23, 2022
66eeee5
Remove the email function (#4870)
yubiuser Aug 24, 2022
9b5ea13
Use utils.sh in install script
yubiuser Aug 18, 2022
1335c44
Add jq to dependencies
yubiuser Aug 24, 2022
49b9dc8
Remove json_extract function
yubiuser Aug 24, 2022
d6cfa57
Add jq as dependency and remove json_extract (#4878)
yubiuser Aug 26, 2022
53c0982
Set connection timeout for curl
yubiuser Aug 30, 2022
230d6a4
Semi hardcode the connection_timeout value
yubiuser Aug 31, 2022
f998eee
Release 5.12 (#4889)
PromoFaux Sep 2, 2022
46e1a87
Tweak FTL test to ensure we don't get false positives on incompatible…
PromoFaux Sep 3, 2022
0f74165
Drop Ubuntu 18 tests
PromoFaux Sep 3, 2022
711035f
Update FTL Binary test to ensure we catch incompatibility issues earl…
yubiuser Sep 3, 2022
5d913ad
Release 5.12 (#4889) (#4897)
PromoFaux Sep 5, 2022
89b8841
Fix 4898
yubiuser Sep 6, 2022
ef45578
Fix 4898 (#4899)
yubiuser Sep 6, 2022
fe8b0e9
v5.12.1 (#4908)
PromoFaux Sep 14, 2022
8dbe6fc
master-> Dev (#4912)
PromoFaux Sep 14, 2022
bf256aa
If docker version env var is set, store it in /etc/pihole/versions fi…
PromoFaux Sep 14, 2022
760325e
Update piholeDebug to source versions file for DOCKER_VERSION instead…
PromoFaux Sep 14, 2022
c1a927f
Run test workflows on python 3.10
yubiuser Sep 15, 2022
8bc5b16
Set tox envlist to py3
yubiuser Sep 15, 2022
3d53bda
Update advanced/Scripts/updatecheck.sh
PromoFaux Sep 15, 2022
515e5f8
Store docker version in versions file (If `PIHOLE_DOCKER_TAG` variabl…
PromoFaux Sep 15, 2022
5cc317d
Change texts after Block Page removal
rdwebdesign Sep 16, 2022
80c7703
Fixing texts forgotten after Blocking Page removal (#4915)
yubiuser Sep 16, 2022
7e6f81f
Add comment in lighttpd.conf how to change the server port
yubiuser Sep 17, 2022
5fe1706
Bump actions/stale from 5.1.1 to 5.2.0
dependabot[bot] Sep 17, 2022
16640ee
Bump actions/stale from 5.1.1 to 5.2.0 (#4918)
yubiuser Sep 17, 2022
5332b31
Add comment in lighttpd.conf how to change the server port (#4917)
yubiuser Sep 17, 2022
7eff36b
Update workflow python to 3.10 and allow any python3 version in tests…
yubiuser Sep 17, 2022
2ff1fa1
Merge branch 'development' into use_utils
yubiuser Sep 17, 2022
f90fb8b
Change wording in chronometer
yubiuser Sep 14, 2022
00e51f3
Blcked => Block
yubiuser Sep 17, 2022
40f00c6
Fix gravity database integrity check
yubiuser Sep 18, 2022
2c3fea3
Remove FAQ_ULA as it is unused in `core`
yubiuser Sep 18, 2022
60c35cb
Remove unused check_database_integrity()
yubiuser Sep 18, 2022
d581401
Fix gravity database integrity check (#4921)
yubiuser Sep 18, 2022
d88629e
v5.12.2 (#4922)
PromoFaux Sep 19, 2022
da6596e
Master -> Dev (#4925)
PromoFaux Sep 19, 2022
73ca4eb
Update test requirements
yubiuser Sep 19, 2022
0932c5c
Add black python code formatter action
yubiuser Sep 19, 2022
0df38cd
Format all /test files with black
yubiuser Sep 19, 2022
17ec88d
Remove `installed_binary` variable which was leftover from https://gi…
yubiuser Sep 19, 2022
b6d1bd7
Read docker tag from file in root, not the previously set environment…
PromoFaux Sep 19, 2022
d4ce5b1
Fix tabs in dialog boxes
yubiuser Sep 22, 2022
4f4dfe3
Fix tabs in dialog boxes (#4932)
yubiuser Sep 22, 2022
bb57a9e
Handle more than one default gateway in debug script
yubiuser Sep 22, 2022
ba8a50c
Bump actions/stale from 5.2.0 to 6.0.0
dependabot[bot] Sep 24, 2022
54bcf56
Bump actions/stale from 5.2.0 to 6.0.0 (#4938)
PromoFaux Sep 24, 2022
9463c3c
Change wording in chronometer (#4910)
PromoFaux Sep 24, 2022
1c1407e
Use utils.sh in install script (#4872)
PromoFaux Sep 24, 2022
755ec8b
$$ != $
PromoFaux Sep 24, 2022
951b4ed
Remove cronjob that checks local versions every 10 minutes - only che…
jpgpi250 Sep 24, 2022
0a780a9
Fix issue in #4872 missed in review (#4940)
PromoFaux Sep 24, 2022
a8ce135
Set connection timeout for curl (#4884)
dschaper Sep 25, 2022
9debd22
If, after reading /pihole.docker.tag into DOCKER_TAG, it does not mat…
PromoFaux Sep 25, 2022
bf5fffa
Better wording and test with color
yubiuser Sep 25, 2022
22ebf21
Use POSIX
yubiuser Sep 25, 2022
37b45d4
Read docker tag from file in root, not the previously set environment…
dschaper Sep 25, 2022
f8a1291
Handle more than one default gateway in debug script (#4934)
dschaper Sep 25, 2022
e1a2591
Format test.yml
yubiuser Sep 26, 2022
1b0b0ca
Update python tests and add black code formatter action (#4926)
PromoFaux Sep 26, 2022
3d01e4d
No detour - use pihole-FTL.conf to get the API port number
yubiuser Sep 21, 2022
25ba681
Remove last traces
yubiuser Sep 25, 2022
276c480
Return default port if non-numeric characters are set in pihole-FTL.c…
yubiuser Sep 26, 2022
a705fbc
Add Fedora 35 and 36 to the test suite
yubiuser Sep 29, 2022
d48c557
Fix Deepsource warning message for index.php file
rdwebdesign Sep 30, 2022
0749de3
Update Amazon support URL to HTTPS in README
davidjb Sep 30, 2022
6057b13
Add initscripts to Fedora 35 and 36 dockerfile
yubiuser Oct 1, 2022
3731b65
Remoce Fedora 34 from tests
yubiuser Oct 1, 2022
7fd062c
Update Amazon support URL to HTTPS in README (#4954)
PromoFaux Oct 1, 2022
9dd51b7
Remove pihole-FTL.port file (#4945)
PromoFaux Oct 1, 2022
71b5606
Add Fedora 35 and 36, remove 34 to/from the test suite (#4952)
dschaper Oct 1, 2022
34b6600
`leasetime` (local) should have an `h` after it to signify 24h lease,…
PromoFaux Oct 1, 2022
b7b5ffa
remove old code per review from @yubiuser and @dschaper
PromoFaux Oct 1, 2022
77f0012
Fix default DHCPv4 leasetime value (#4956)
PromoFaux Oct 1, 2022
997a771
Fix Deepsource.io warning message for index.php file (#4953)
PromoFaux Oct 1, 2022
4265bcb
Add initscripts to CentOS8 dockerfile
yubiuser Oct 8, 2022
fae1d13
Add initscripts to CentOS8 dockerfile (#4966)
PromoFaux Oct 9, 2022
cf467db
Bump actions/stale from 6.0.0 to 6.0.1
dependabot[bot] Oct 9, 2022
223ef72
Bump actions/checkout from 3.0.2 to 3.1.0
dependabot[bot] Oct 9, 2022
4f3debc
Bump actions/checkout from 3.0.2 to 3.1.0 (#4964)
PromoFaux Oct 9, 2022
4698671
Bump actions/stale from 6.0.0 to 6.0.1 (#4963)
PromoFaux Oct 9, 2022
c5b3b8d
Fix `pihole -r` dialog exit
rdwebdesign Oct 8, 2022
fed58f0
Fix `pihole -r` dialog exit (#4965)
dschaper Oct 10, 2022
17779ba
Pi-hole v5.13 (#4960)
PromoFaux Oct 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions advanced/Scripts/list.sh
Original file line number Diff line number Diff line change
@@ -100,21 +100,29 @@ Options:
ValidateDomain() {
# Convert to lowercase
domain="${1,,}"
local str validDomain

# Check validity of domain (don't check for regex entries)
if [[ "${#domain}" -le 253 ]]; then
if [[ ( "${typeId}" == "${regex_blacklist}" || "${typeId}" == "${regex_whitelist}" ) && "${wildcard}" == false ]]; then
validDomain="${domain}"
else
if [[ ( "${typeId}" == "${regex_blacklist}" || "${typeId}" == "${regex_whitelist}" ) && "${wildcard}" == false ]]; then
validDomain="${domain}"
else
# Check max length
if [[ "${#domain}" -le 253 ]]; then
validDomain=$(grep -P "^((-|_)*[a-z\\d]((-|_)*[a-z\\d])*(-|_)*)(\\.(-|_)*([a-z\\d]((-|_)*[a-z\\d])*))*$" <<< "${domain}") # Valid chars check
validDomain=$(grep -P "^[^\\.]{1,63}(\\.[^\\.]{1,63})*$" <<< "${validDomain}") # Length of each label
# set error string
str="is not a valid argument or domain name!"
else
validDomain=
str="is too long!"

fi
fi

if [[ -n "${validDomain}" ]]; then
domList=("${domList[@]}" "${validDomain}")
else
echo -e " ${CROSS} ${domain} is not a valid argument or domain name!"
echo -e " ${CROSS} ${domain} ${str}"
fi

domaincount=$((domaincount+1))