Changeset 88


Ignore:
Timestamp:
Jul 19, 2014, 2:17:47 PM (10 years ago)
Author:
alloc
Message:

v.32 hotfix: Allow empty Telnet password

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/NamePatcher/NamePatcher.userprefs

    r86 r88  
    33  <MonoDevelop.Ide.Workbench ActiveDocument="NamePatcher.cs">
    44    <Files>
    5       <File FileName="NamePatcher.cs" Line="98" Column="5" />
     5      <File FileName="NamePatcher.cs" Line="175" Column="34" />
    66      <File FileName="NameNormalizer.cs" Line="188" Column="1" />
    77    </Files>
  • scripts/usr/local/lib/7dtd/common.sh

    r80 r88  
    188188        local TEL_PORT=$(getConfigValue $1 TelnetPort)
    189189        local TEL_PASS=$(getConfigValue $1 TelnetPassword)     
    190         if [ "$TEL_ENABLED" = "true" ] && [ -n "$TEL_PASS" ]; then
     190        if [ "$TEL_ENABLED" = "true" ]; then
    191191                local TEMPFILE=$(mktemp)
    192192                rm -f $TEMPFILE
     
    195195                nc 127.0.0.1 $TEL_PORT <&3 &
    196196                local NCPID=$!
    197                 printf "$TEL_PASS\n$2\n" >&3
     197                if [ -n "$TEL_PASS" ]; then
     198                        printf "$TEL_PASS\n$2\n" >&3
     199                else
     200                        printf "$2\n" >&3
     201                fi
    198202                sleep ${3:-1}
    199203                printf "exit\n" >&3
     
    203207                rm -f $TEMPFILE
    204208        else
    205                 echo "Telnet not enabled or no password set."
     209                echo "Telnet not enabled."
    206210        fi
    207211}
  • scripts/usr/local/lib/7dtd/serverconfig.sh

    r67 r88  
    364364serverconfig_TelnetPassword_Type() {
    365365        echo "string"
    366 }
    367 serverconfig_TelnetPassword_Validate() {
    368         if [ -z $1 ]; then
    369                 echo "0"
    370         else
    371                 echo "1"
    372         fi
    373 }
    374 serverconfig_TelnetPassword_ErrorMessage() {
    375         echo "Telnet must have a password set to function."
    376366}
    377367
     
    740730                        echo
    741731                        echo "NOTE: Telnet will always be enabled for management purposes!"
    742                         echo "Make sure you block external access to this port!"
     732                        echo "Make sure you block external access to this port or set no password"
     733                        echo "so the server will only listen on the loopback interface!"
    743734                        echo
    744735                fi
Note: See TracChangeset for help on using the changeset viewer.