Skip to content

Commit 8bac253

Browse files
nvinsonCogitri
authored andcommitted
Do not interpret content when posting to dpaste
'echo -e' is used to prepare data for dpaste. However if `echo -e "${content}"` is used, the content gets interpreted as well. This results in constructs such as '\0' getting misinterpreted as the byte 0x00. As a result, the interperted context can result in output not compatible with dpaste. fixes bug #25
1 parent b65dedd commit 8bac253

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wgetpaste

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ POST_dpaste() {
133133
echo -e "--$boundary\r"
134134
echo -e "Content-Disposition: form-data; name=\"content\"\r"
135135
echo -e "\r"
136-
echo -e "${content}\r"
137-
echo -e "--${boundary}--\r"
136+
echo -n "${content}"
137+
echo -e "\r\n--${boundary}--\r"
138138
ADDITIONAL_HEADERS_dpaste=("Content-Type: multipart/form-data; boundary=${boundary}")
139139
}
140140
REGEX_RAW_dpaste='s|^http.*|\0.txt|'

0 commit comments

Comments
 (0)