data-govt-nz / ckanext-security

A CKAN extension to hold various security improvements for CKAN
GNU Affero General Public License v3.0
25 stars 32 forks source link

fix issue where api post requests would 500 error #17

Closed ebuckley closed 6 years ago

ebuckley commented 6 years ago

Issue

The app would serve 500's when an api Post request is made.

Fix

  1. whitelist any request which starts with the path /api
  2. fix a 500 error caused by calling self.referer.startswith when referer is None.