updated csrf attack detection