Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[5.x]: Fatal error: Uncaught yii\base\UnknownPropertyException: Invalid general config setting: allowedPrivateHosts.

Chiusa
#20,015 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start by reading the general configuration handling and URL validator changes mentioned in the report; the payload does not name specific files or tests. Check how allowedPrivateHosts is supported by the URL validator and how Craft general settings accept configuration values. Done means the setting is accepted in general.php and private IPs can be accessed without the reported exception.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug repo:cms
What happened?
Description

Hi there, we have an issue in a local environment where we could not access private IPs and have become aware it is due to recent changes the url-validator module.

Is it possible for Craft 5 to support allowedPrivateHosts to override url-validator's validation for local/dev addresses?

Currently when we try we get the error in the subject.

Fatal error: Uncaught yii\base\UnknownPropertyException: Invalid general config setting: allowedPrivateHosts.

Steps to reproduce
  1. Update general.php with allowedPrivateHosts containing array of private IPs
Expected behavior

No error and private IPs can be accessed

Actual behavior

Error message:
Fatal error: Uncaught yii\base\UnknownPropertyException: Invalid general config setting: allowedPrivateHosts.

Craft CMS version

5.11.5.1

PHP version

8.2

Operating system and version

Ubuntu Linux 24.04

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Lingua principale
PHP
Stelle
3.6k
Fork
708
Merge medio
11h 23m
PR unite (30g)
278

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di craftcms/cms

Tutte le issue di craftcms/cms

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.