e64d62b5403c486838f43bf4d1283c3230840fea angie Wed May 22 10:31:45 2019 -0700 Adding quotes necessary for dealing with decoded usernames that end with space(s). refs #22440 diff --git src/hg/hgSession/sessionDataConvert.sh src/hg/hgSession/sessionDataConvert.sh index a6410a5..d0e9946 100755 --- src/hg/hgSession/sessionDataConvert.sh +++ src/hg/hgSession/sessionDataConvert.sh @@ -25,31 +25,31 @@ settingVal=$(grep ^$settingName $cgiDir/../cgi-bin/hg.conf | sed -e 's/.*=//;') fi if [ "$settingVal" == "" -a -f $cgiDir/../cgi-bin/hg.conf.private ]; then settingVal=$(grep ^$settingName $cgiDir/../cgi-bin/hg.conf.private | sed -e 's/.*=//;') fi if [ "$settingVal" == "" ]; then echo "Unable to find $settingName setting in cgi-bin hg.conf or hg.conf.private" exit 1 fi echo $settingVal } # Get the hex string md5sum for input without adding a newline at the end. function getMd5Sum() { - echo -n $* | md5sum | awk '{print $1;}' + echo -n "$*" | md5sum | awk '{print $1;}' } # Decode %xx encodings into original characters function urlDecode() { echo -e "$(echo $* | sed 'y/+/ /; s/%/\\x/g')" } # Check args if [[ $# -eq 0 ]] ; then echo "$HELP_STR" exit 0 elif [[ $# -ne 2 ]] ; then echo "Wrong number of arguments ($#; need 2)" echo "$HELP_STR"