Using a parameter name with an underscore doesn't work

Created on 12 December 2023, 11 months ago

Problem/Motivation

Parameter names containing an underscore do not work.

Steps to reproduce

  1. Go to /admin/config/services/key-auth
  2. Set the parameter name to API_KEY
  3. Make a curl request to an endpoint with cURL using curl -H "API_KEY: {API key goes here}" https://site.example.com
  4. The header doesn't show up in $request->headers

Proposed resolution

Add validation to the parameter name field to prevent using the underscore character, as well as any others that shouldn't be used.

If underscore should be allowed and work, then figure out why it isn't working.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024