[go: up one dir, main page]

Skip to content

Incorrect handling of X-Forwarded-For header when deriving client IP

When visiting a page insertPageView throws an error: ERROR svc pageService.insertPageView: Exec() failed: pq: value too long for type character varying(15) The problem seems to be that in the case of X-Forwarded-For header being used, it can happen especially when you are using multiple reverse proxies that you get a list of multiple ips that are comma separated. varying(15) is then not sufficient.

In the regard of saving ips to the database, I also wanted to raise the question why we save the full ips in the first place, as this will raise data privacy questions.