@@ -0,0 +1,1305 @@
+package org.fedorahosted.flies.security;%0A%0Aimport javax.faces.context.FacesContext;%0A%0Aimport org.jboss.seam.annotations.Create;%0Aimport org.jboss.seam.annotations.Install;%0Aimport org.jboss.seam.annotations.Name;%0Aimport org.jboss.seam.ui.ClientUidSelector;%0Aimport org.jboss.seam.util.RandomStringUtils;%0A%0A@Name(%22org.jboss.seam.ui.clientUidSelector%22)%0A@Install(precedence = Install.DEPLOYMENT)%0A/**%0A * Workaround for https://jira.jboss.org/browse/JBSEAM-4503%0A * supplied by %22wolfgang geck%22 in %0A * http://seamframework.org/Community/SeamTokenTagProblemCSRF#comment110227%0A */%0Apublic class FixedClientUidSelector extends ClientUidSelector %7B%0A%0A%09private static final long serialVersionUID = -4923235748771706010L;%0A%09private String clientUid;%0A%0A%09@Create%0A%09public void onCreate() %7B%0A%09%09setCookiePath(FacesContext.getCurrentInstance().getExternalContext()%0A%09%09%09%09.getRequestContextPath());%0A%09%09setCookieMaxAge(-1);%0A%09%09setCookieEnabled(true);%0A%09%09clientUid = getCookieValue();%0A%09%7D%0A%0A%09public void seed() %7B%0A%09%09if (!isSet()) %7B%0A%09%09%09clientUid = RandomStringUtils.random(50, true, true); // Fixed%0A%09%09%09setCookieValueIfEnabled(clientUid);%0A%09%09%7D%0A%09%7D%0A%0A%09public boolean isSet() %7B%0A%09%09return clientUid != null;%0A%09%7D%0A%0A%09public String getClientUid() %7B%0A%09%09return clientUid;%0A%09%7D%0A%0A%09@Override%0A%09protected String getCookieName() %7B%0A%09%09return %22javax.faces.ClientToken%22;%0A%09%7D%0A%0A%7D

Implement workaround for JBSEAM-4503