Skip to content

Commit ba6b902

Browse files
committed
Split long txt records to 255 chunks to prevent bind issues
Thanks to @setiseta for the solution and @kpapad904 for pointing us to it. This commit also closes hestiacp#678, because the to long txt records will now be splitted up and also closes hestiacp#693 because it was the last, suggested pr took over from vesta.
1 parent 2fe2209 commit ba6b902

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ All notable changes to this project will be documented in this file.
6767
- Hardening nginx configuration, drop TLSv1.1 support.
6868
- Fixed excluding folders named "logs" from restore backup, thanks to @davidgolsen.
6969
- Fixed typo in delete psql database part, thanks to @joshbmarshall.
70+
- Split long txt records to 255 chunks to prevent bind issues, thanks to @setiseta.
7071

7172
## [1.0.6] - 2019-09-24 - Hotfix
7273
### Bugfixes

func/domain.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ update_domain_zone() {
466466
VALUE=$(idn --quiet -a -t "$VALUE")
467467
fi
468468

469+
if [ "$TYPE" = 'TXT' ] && [[ ${VALUE:0:1} != '"' ]]; then
470+
VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n '"$"')
471+
fi
472+
469473
if [ "$SUSPENDED" != 'yes' ]; then
470474
eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $zn_conf
471475
fi

0 commit comments

Comments
 (0)