-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Says invalid fcgi value, but it isn't #10462
Comments
@withinboredom I have fixed it on release v1.9.1 that will be released this week, it should accept again fcgi, or FCGI, etc. If you are willing to test and provide feedback, please change your image on deploy to Thanks |
Awesome, I will give it a go this evening! |
I am bumping onto the same issue. Has the fix been included in I might be be getting wrong, but seems like the code in the current main branch does not allow using hardcoded values. I see they validate against the following regexes: // NGINXVariable allows entries with alphanumeric characters, -, _ and the special "$"
NGINXVariable = regexp.MustCompile(`^[A-Za-z0-9\-\_\$\{\}]*$`) Can we use hard-coded values, like that, similar to the examples demonstrated in the docs https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/?
|
Also experiencing this issue. This appears to have been published in the https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.9.1 release? |
Unfortunately Im still getting the same error on 1.9.1
|
We experience the same issue on 1.9.1 |
Any roadmap to a fix? |
No, at the moment we are running to release a new version with http2 CVE fix |
I tried out this tutorial: https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/ And I got also the error with ingress-nginx version 1.9.1 version : k apply -f example-app-ingress.yaml
configmap/example-cm created
Error from server (BadRequest): error when creating "example-app-ingress.yaml": admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: annotation fastcgi-params-configmap contains invalid value Ingress definition # The ConfigMap MUST be created first for the ingress controller to be able to
# find it when the Ingress object is created.
apiVersion: v1
kind: ConfigMap
metadata:
name: example-cm
data:
SCRIPT_FILENAME: "/var/www/html/public/index.php"
DOCUMENT_ROOT: "/var/www/html/public"
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "FCGI"
nginx.ingress.kubernetes.io/fastcgi-index: "index.php"
nginx.ingress.kubernetes.io/fastcgi-params-configmap: "example-cm"
name: example-app
spec:
ingressClassName: nginx
rules:
- host: example-app.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
name: fastcgi But with ingress-nginx version 1.8.2 there is no problem and it just works correctly! |
@rikatz -- what's the point of a fix for that if nobody using the fpm feature can upgrade? |
Well, for a matter of bugs, I think security has priority over bug on a feature :) I am super busy with other things and honestly had to stop during a PTO to do that release, so I'm happy to review a PR that fixes fpm bug as well and try a new release, otherwise we need to wait until I have some time to fix it. I've mentioned during today's community meeting that this bug is on my radar, but I didn't had time to fix it |
/priority critical-urgent |
Also, @withinboredom please check your tone. We are volunteers and are running low on contributors, we are always happy to help. Release 1.8 is still supported, if fpm is working there, you can downgrade for it while waiting for a fix |
I apologize for my tone. It wasn't meant to be antagonistic, just typed it quickly while doing something else. If anything, I think it was meant to be an attempt at sarcastic or funny? Either way, taking into consideration your context, and reading it again, I can clearly see the hostility you may have seen. This was not my intention, at all. I sincerely apologize for that. If you (or someone) can point me in the right general direction, I can investigate the issue and contribute with a fix, or if I hit the limits of my capabilities, report my findings here. Like, should I start in the validation webhook or is there a better place to start digging? |
No worries, thanks for understanding it.
|
Actually sorry, the validation for cmap key/value is on this line/regex:
|
@rikatz What is the expected release for this fix? Particularly on the helm chart. |
Hi all, I will TRY to do a new release with this fix tomorrow, Oct 22nd |
I have similar problem so still waiting for fix |
This was fixed on v1.9.4 released yesterday |
Hey bud, sorry didn't mean to wake anyone. I immediately deleted my comment after realising upping my version could address my problem. I'm still working through this so hoping to say "it works" ... if it works :) But again, deleted my comment to avoid noise. So sorry that it made noise anyways :( |
Uhh it LOOKS to be working for me (1.9.4) but I'm having other issues probably unrelated. So perhaps consider this a positive sample. |
Happened also on |
What happened:
Upgrade to 4.9.0:
and now seeing this when trying to update an ingress. Changing any key to a hardcoded value (and not a variable) results in this error. For example, setting
DOCUMENT_ROOT
to"/app"
results in the same error but forDOCUMENT_ROOT
.What you expected to happen:
To be able to hard-code variables sent to PHP.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
):Environment:
Cloud provider or hardware configuration: Bare Metal
OS (e.g. from /etc/os-release): Ubuntu 22.04.3 LTS
Kernel (e.g.
uname -a
): Linux cameo 5.15.0-84-generic Fix sort for catch all server #93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxInstall tools:
Basic cluster related info:
kubectl version
kubectl get nodes -o wide
How was the ingress-nginx-controller installed:
helm
How to reproduce this issue:
Now create an ingress that uses the config map:
See the error mentioned at the beginning.
The text was updated successfully, but these errors were encountered: