7 | | - I case 4, using a custom header by admin, a MITM may happen by: |
8 | | user -- HTTP -- MITM(retrive password, set header: `HTTP_X_FORWARDED_PROTO: https`) -- nginx(header: `HTTP_X_FORWARDED_PROTO: https`, set header: `HTTP_X_FORWARDED_PROOO: http`) -- gunicorn(Pass, no user redirect because `HTTP_X_FORWARDED_PROTO == https`) -- Django(`is_secure() == True` because there's no `else clause`). |
| 3 | - In case 4, using a custom header by admin, a MITM may happen by: |
| 4 | user -- HTTP -- MITM(retrive password, set header: `HTTP_X_FORWARDED_PROTO: https`) -- nginx(header: `HTTP_X_FORWARDED_PROTO: https`, set header: `HTTP_X_FORWARDED_PROOO: http`) -- gunicorn(Pass, no user redirect because `HTTP_X_FORWARDED_PROTO == https`) -- Django(`is_secure() == True` because there's no `else` clause). |