You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MapFish print version: current master code. According to commit history, it should fail from 3.23 and later
Java version: openjdk 11.0.16 2022-07-19
OS: Linux Debian 11
I will send a pull request.
Describe the bug
The referer header is incorrectly spelled in file core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
The correct English word is Referrer, but the HTTP header is spelled "Referer" (or "referer", since they are case insensitive).
This used to work correctly in Mapfish print, but commit 9a50a72 introduced a massive spelling correction in Mapfish and broke the spelling of the Header ( see 9a50a72 ).
Therefore, the allowedReferers configuration yaml tag fails, since the wrong header is checked.
How to reproduce
Create a template including a referer header check, for instance:
Context
I will send a pull request.
Describe the bug
The referer header is incorrectly spelled in file core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
The correct English word is Referrer, but the HTTP header is spelled "Referer" (or "referer", since they are case insensitive).
This used to work correctly in Mapfish print, but commit 9a50a72 introduced a massive spelling correction in Mapfish and broke the spelling of the Header ( see 9a50a72 ).
Therefore, the allowedReferers configuration yaml tag fails, since the wrong header is checked.
How to reproduce
Create a template including a referer header check, for instance:
Then try to get the capabilities file:
https://test.camptocamp.com/print/print/a4_landscape/capabilities.json
A HTTP 403 error will be get:
Versions prior to 3.23 returned the capabilities document instead.
Actual results
A HTTP 403 error will be get:
Expected results
Versions prior to 3.23 returned the capabilities document instead.
The text was updated successfully, but these errors were encountered: