From f4a6033fff1dcefb5f6725664054d12fa14fd949 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 8 Jun 2020 09:45:03 -0700 Subject: [PATCH] Fixed x-forwarded-for server crash --- agents/MeshCentralRouter.exe | Bin 1874752 -> 1874752 bytes webserver.js | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agents/MeshCentralRouter.exe b/agents/MeshCentralRouter.exe index 3185bf2b125db52a4132de31171dd23de27a7993..faf55b043b8395fc3ee1772467e72448b169da34 100644 GIT binary patch delta 9950 zcmb7KcU%Nb8IG348R>Ppy)+vMf?l?Hem+QpC z<r6z#h0fGxp8<3)cI!|rOj#Y^`C9+g zffZO|&Kd+YvkKzFL|Cz;t=KpV+DD%hIOH3oC6w`<) z2eS149MTq;i@g@Q)8dZ1e}d?SaV#&#B#uuk#lvY4nmhZ^`49uG0vpP&&yX07`U|kl zqXO}`b|oSms{rex)*{Z+Y(kWE*n*hmRE2oMo8s~)irr!nE$}d$lFyi7A;TA*J5aOP zv|F28kSVLc#MaQSUzO5C4xua-l<0X3<+tD@;sl`j^K5({11-In(4u=X6bJSb^K@Ym zOoaMa;@Q^`(TUJN8O;11)6ZZC91V1aS@$#R4W@5lIFwn7J!tyfY+}D+``~E|U8Y+M zGuWc^Vd%(E+)05Jww9e)2yqF-t+bGZyU#|G&9>whOg`843 z#<|Es_h9l+hQF}TgITyphDJgYoMy>dG0jcZ>l=pktSoU?VYwDu>61=35yRAX5qC%a zfp|W$3PW_&QWRZ1*vJZ4LB1?;Yc}E=(SM>(1H+L_6UDFf&NnhH))9l)|v1Nws=$Q$-h8+sHf?ZLS#At28L)5@9Jo>E-d9Lj-Hp) z2#PzHJcY@7*pU;9+rvt%Vg8F5{s}aKcnHPg*Gok;mTE2inj7YfY2+rO4v&oxfVjvm z2(g!4h|V6i1+*ya;Q+(_;bEx%!5oG7hG0hA(IElxONJ|g=|R05*#$L!Ff1oMP!8mJ z=#mSbvBMnfKqGWT6y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V5u{-G%b%@nQFpd~#g)SA=?k0WEPL*LwDLu=ZNJbbJ73mj zsQ!6%`ajg0-Yk0ABH0|42C-wKPuw?N-c`BiRfppt!r64M^O=V-d(@S_S$FBr|1tOI zKk_%-L;v58mlk-h2zb&WEYAN-#H>i`j0>htiLuiMOg8no>Jak7m;3)b|8n#cOG0Yr z!C3>G;XwQQuYRBHF>qVt@`G;|=iHQ6M{g`HGLMUR7_WM-zFk;1 zv$lIw@j-QyZ4RXuLR&9s@%??P{I2=@XZPHy$g+gTTW*x~J<$C^j?S~;IlWZ=7Zi4` Av;Y7A diff --git a/webserver.js b/webserver.js index 43990566..359d74b0 100644 --- a/webserver.js +++ b/webserver.js @@ -4187,9 +4187,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { ) { if (req.headers['cf-connecting-ip']) { // Use CloudFlare IP address if present req.clientIp = req.headers['cf-connecting-ip'].split(',')[0].trim(); - } else if (res.headers['x-forwarded-for']) { + } else if (req.headers['x-forwarded-for']) { req.clientIp = req.headers['x-forwarded-for'].split(',')[0].trim(); - } else if (res.headers['x-real-ip']) { + } else if (req.headers['x-real-ip']) { req.clientIp = req.headers['x-real-ip'].split(',')[0].trim(); } else { req.clientIp = ipex; @@ -4229,7 +4229,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if ((domain != null) && (domain.share != null)) { var rpath; if (domain.dns == null) { rpath = req.url.split('/'); rpath.splice(1, 1); rpath = rpath.join('/'); } else { rpath = req.url; } - if ((res.headers != null) && (res.headers.upgrade)) { + if ((req.headers != null) && (req.headers.upgrade)) { // If this is a websocket, stop here. res.sendStatus(404); } else {