Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | # |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | # |
michael@0 | 7 | # This script expects the following environment variables to be set: |
michael@0 | 8 | # SYMBOL_SERVER_HOST : host to upload symbols to |
michael@0 | 9 | # SYMBOL_SERVER_USER : username on that host |
michael@0 | 10 | # SYMBOL_SERVER_PATH : path on that host to put symbols in |
michael@0 | 11 | # |
michael@0 | 12 | # And will use the following optional environment variables if set: |
michael@0 | 13 | # SYMBOL_SERVER_SSH_KEY : path to a ssh private key to use |
michael@0 | 14 | # SYMBOL_SERVER_PORT : port to use for ssh |
michael@0 | 15 | # POST_SYMBOL_UPLOAD_CMD: a commandline to run on the remote host after |
michael@0 | 16 | # uploading. The full path of the symbol index |
michael@0 | 17 | # file will be appended to the commandline. |
michael@0 | 18 | # |
michael@0 | 19 | # The script expects two command-line arguments, in this order: |
michael@0 | 20 | # - The symbol index name |
michael@0 | 21 | # - The symbol archive |
michael@0 | 22 | # |
michael@0 | 23 | |
michael@0 | 24 | set -e |
michael@0 | 25 | |
michael@0 | 26 | : ${SYMBOL_SERVER_HOST?} ${SYMBOL_SERVER_USER?} ${SYMBOL_SERVER_PATH?} ${1?"You must specify a symbol index name."} ${2?"You must specify a symbol archive to upload"} |
michael@0 | 27 | |
michael@0 | 28 | SYMBOL_INDEX_NAME="$1" |
michael@0 | 29 | SYMBOL_ARCHIVE="$2" |
michael@0 | 30 | |
michael@0 | 31 | hash=`openssl dgst -sha1 "${SYMBOL_ARCHIVE}" | sed 's/^.*)=//' | sed 's/\ //g'` |
michael@0 | 32 | archive="${hash}-"`basename "${SYMBOL_ARCHIVE}" | sed 's/\ //g'` |
michael@0 | 33 | echo "Transferring symbols... ${SYMBOL_ARCHIVE}" |
michael@0 | 34 | scp -oLogLevel=DEBUG -oRekeyLimit=10M ${SYMBOL_SERVER_PORT:+-P $SYMBOL_SERVER_PORT} \ |
michael@0 | 35 | ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} "${SYMBOL_ARCHIVE}" \ |
michael@0 | 36 | ${SYMBOL_SERVER_USER}@${SYMBOL_SERVER_HOST}:"${SYMBOL_SERVER_PATH}/${archive}" |
michael@0 | 37 | echo "Unpacking symbols on remote host..." |
michael@0 | 38 | ssh -2 ${SYMBOL_SERVER_PORT:+-p $SYMBOL_SERVER_PORT} \ |
michael@0 | 39 | ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} \ |
michael@0 | 40 | -l ${SYMBOL_SERVER_USER} ${SYMBOL_SERVER_HOST} \ |
michael@0 | 41 | "set -e; |
michael@0 | 42 | umask 0022; |
michael@0 | 43 | cd ${SYMBOL_SERVER_PATH}; |
michael@0 | 44 | unzip -n '$archive'; |
michael@0 | 45 | rm -v '$archive';" |
michael@0 | 46 | if test -n "$POST_SYMBOL_UPLOAD_CMD"; then |
michael@0 | 47 | echo "${POST_SYMBOL_UPLOAD_CMD} \"${SYMBOL_SERVER_PATH}/${SYMBOL_INDEX_NAME}\"" |
michael@0 | 48 | ssh -2 ${SYMBOL_SERVER_PORT:+-p $SYMBOL_SERVER_PORT} \ |
michael@0 | 49 | ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} \ |
michael@0 | 50 | -l ${SYMBOL_SERVER_USER} ${SYMBOL_SERVER_HOST} \ |
michael@0 | 51 | "${POST_SYMBOL_UPLOAD_CMD} \"${SYMBOL_SERVER_PATH}/${SYMBOL_INDEX_NAME}\"" |
michael@0 | 52 | fi |
michael@0 | 53 | echo "Symbol transfer completed" |