After looking at it a bit - it appears that the crumb header is being 
issued with the request as `Crumb`.

The CrumbFilter is looking for `Jenkins-Crumb` or `.crumb`.

As such it fails.  Appears to be a bug to me?

On Friday, August 28, 2020 at 2:53:39 PM UTC-5 Shaun Thompson wrote:

> I'm developing a custom plugin that includes a class with a method 
> annotated with 
> @JavaScriptMethod.  
>
> It was working until I updated to the latest version of Jenkins 2.250 
> which forces CSRF protection.
>
> I can't find anything to indicate how to get/add the CSRF token when 
> calling this method
>
> @JavaScriptMethod
> public void setUserId(final String value) {
>         userId = value;
> }
>
> <st:bind var="instance" value="${it}"/>
>
> instance.setUserId($('#userId')
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/a279989d-ebdb-45df-ad72-7d50e2f61bd6n%40googlegroups.com.

Reply via email to