payloadcms / payloadcms/payload
Admin panel sends fallback-locale=null as literal string in URL when localization is not configured
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
Multiple UI components send the query parameter fallback-locale=null as a literal string in the URL, even when localization is not configured in the Payload config. The string "null" is sent as text rather than omitting the parameter entirely.
This causes WAF scoring issues — systems like Cloudflare OWASP Core Ruleset detect =null as a potential type manipulation / deserialization injection attempt and add anomaly points (OWASP rules 942X).
Affected files in @payloadcms/ui/dist/:
- elements/SaveDraftButton/index.js (line 49): ?locale=${locale}&depth=0&fallback-locale=null&draft=true
- elements/Autosave/index.js (line 92): 'fallback-locale': 'null'
- elements/PublishButton/index.js (line 97): 'fallback-locale': 'null'
- elements/UnpublishButton/index.js (line 80): 'fallback-locale': 'null'
- elements/Status/index.js (lines 67, 74): fallback-locale=null
- providers/DocumentInfo/index.js (line 300): 'fallback-locale': 'null'
Expected behavior: When fallbackLocale is null or localization is not configured, the parameter should be omitted from the URL entirely instead of being sent as the literal string "null".
Link to the code that reproduces this issue
https://github.com/hrodriguez-stack/payload-multipart-bug
Reproduction Steps
This is reproducible with any Payload v3 project that does NOT have localization configured. No specific repo needed — the behavior is in the core @payloadcms/ui package.
Minimal steps without a repo:
- pnpx create-payload-app@latest -t blank
- Do NOT configure localization in payload.config.ts
- Open Network tab in browser DevTools
- Save any document
- Observe fallback-locale=null in the request URL
Reproduction steps:
- Create a project with pnpx create-payload-app@latest -t blank
- Do not add localization to the payload config
- Create any collection, add a document
- Open browser DevTools Network tab
- Click Save Draft or wait for Autosave
- Observe the request URL contains fallback-locale=null as literal text
- This triggers OWASP rule 942X (SQLi/Anomaly detection) in WAF systems that inspect query parameters
Which area(s) are affected?
area: ui, area: core
Environment Info
Binaries:
Node: 24.14.0
npm: 11.9.0
Yarn: N/A
pnpm: 9.7.0
Relevant Packages:
payload: 3.87.0
next: 15.3.9
@payloadcms/db-mongodb: 3.87.0
@payloadcms/db-postgres: 3.87.0
@payloadcms/drizzle: 3.87.0
@payloadcms/email-nodemailer: 3.87.0
@payloadcms/graphql: 3.87.0
@payloadcms/live-preview: 3.87.0
@payloadcms/live-preview-react: 3.87.0
@payloadcms/next/utilities: 3.87.0
@payloadcms/payload-cloud: 3.87.0
@payloadcms/plugin-cloud-storage: 3.87.0
@payloadcms/plugin-form-builder: 3.87.0
@payloadcms/plugin-nested-docs: 3.87.0
@payloadcms/plugin-redirects: 3.87.0
@payloadcms/plugin-search: 3.87.0
@payloadcms/plugin-seo: 3.87.0
@payloadcms/richtext-lexical: 3.87.0
@payloadcms/storage-s3: 3.87.0
@payloadcms/translations: 3.87.0
@payloadcms/ui/shared: 3.87.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:46 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the source for the affected UI entries: SaveDraftButton, Autosave, PublishButton, UnpublishButton, Status, and providers/DocumentInfo; the issue lists their built paths under @payloadcms/ui/dist/. Reproduce with a blank Payload v3 app without localization and inspect the Network tab. Done means requests no longer include fallback-locale when localization is not configured, while configured localization remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100