mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-12-22 14:26:08 +00:00
Always check for valid HTTP method before any modifications
This commit is contained in:
parent
70765fa895
commit
c721ab0506
@ -274,6 +274,7 @@ int main(int argc, char *argv[]) {
|
|||||||
/* Handle OUTBOUND packet, search for Host header */
|
/* Handle OUTBOUND packet, search for Host header */
|
||||||
else if (addr.Direction == WINDIVERT_DIRECTION_OUTBOUND &&
|
else if (addr.Direction == WINDIVERT_DIRECTION_OUTBOUND &&
|
||||||
packet_dataLen > 16 && ppTcpHdr->DstPort == htons(80) &&
|
packet_dataLen > 16 && ppTcpHdr->DstPort == htons(80) &&
|
||||||
|
find_http_method_end(packet_data) &&
|
||||||
(do_host || do_host_removespace)) {
|
(do_host || do_host_removespace)) {
|
||||||
|
|
||||||
data_addr = find_host_header(packet_data, packet_dataLen);
|
data_addr = find_host_header(packet_data, packet_dataLen);
|
||||||
|
Loading…
Reference in New Issue
Block a user