CSRF Cookie fixes

- Only set the cookie if it doesn't exist
- Always mark it secure (it was previously getting re-sent as not)
- Check the value against the header even if there was no value (so that
a request that is missing the cookie but should have had one fails).
This commit is contained in:
Darren Shepherd
2020-02-26 12:35:24 -07:00
parent e2e87cda53
commit 0846768069
2 changed files with 7 additions and 6 deletions

View File

@@ -4,10 +4,9 @@ import (
"encoding/json"
"time"
"github.com/rancher/wrangler/pkg/schemas/validation"
"github.com/gorilla/websocket"
"github.com/rancher/steve/pkg/schemaserver/types"
"github.com/rancher/wrangler/pkg/schemas/validation"
"github.com/sirupsen/logrus"
)