Gravity Forms seem to always have inline event handlers - is there anyway to make these not inline? Otherwise we need to add “unsafe-inline” to our CSP or create hashes for every bit of inline js that GF creates…
This has been asked before without any answer but I would assume will become more of an issue with more security awareness and stricter CSPs…
In short: no there’s no way (without using other plugins/code that filter inline JS).
I asked the same question to support a while ago and submitted it to the roadmap page (but not added to the list by GF). It seems this security issue has no priority at all…
Here the conversation:
Me:
Gravity Forms adds inline scripts to e.g. the submit button (see below). This makes it impossible to set a Content Security Policy without ‘unsafe-inline’. What can I do to use GF with a CSP without using ‘unsafe-inline’? And are there plans to move inline Javascript to files?
it’s a real issue - I see more clients looking to tighten up their CSPs and in this case it’s going to mean we have to move away from GF as there is no solution…
I contacted them with this issue before and submitted a roadmap idea, but so far it hasn’t even moved to the roadmap. I don’t think they get how important this is, because we will have to discontinue using Gravity Forms for a couple of (big) clients as well, if there is no solution soon.
Maybe losing some subscribers doesn’t make a dent overall but if it were up to me I would want to keep those big customers who’s priority it is to abide to CSP because they are your showpiece.
Maybe someone from the Gravity Forms team can shed some light on this? I know the recommended way is to file a roadmap idea, but since there is no feedback on this and apparently multiple parties are asking, I am wondering if this even has a chance of being applied.
I really don’t understand why security isn’t priority number 1 at Gravity Forms. It feels like they are ignoring the issue by not responding to this thread…