Open kraih opened 2 years ago
Would be great to have csrf_field
tag helper.
Would be great to have
csrf_field
tag helper.
That doesn't really work with JSON schema based validation. And has become kinda obsolete with SameSite
cookies.
Edit: And for the record, mojo.js session cookies default to SameSite: lax
. So they are reasonably well protected already, as long as you are not misusing GET
routes.
I’d be willing to create a chat example if someone tells me how to broadcast to websocket clients
I’d be willing to create a chat example if someone tells me how to broadcast to websocket clients
The blue checkmark means it's already done.
Would be great to have
csrf_field
tag helper.That doesn't really work with JSON schema based validation. And has become kinda obsolete with
SameSite
cookies.Edit: And for the record, mojo.js session cookies default to
SameSite: lax
. So they are reasonably well protected already, as long as you are not misusingGET
routes.
Unfortunately, SameSite cookies don't protect CSRF attacks on websockets. Please see this article. So as mentioned there we would need at least to check on the Origin header or use some kind of random generated csrf token. In mojo.pl you could generate an ws(s) url with a query parameter named csrf_token, generated with the existing helper, and then validate that inside the websocket, assuring that the rest of the mojo cookies are valid.
With the 1.0 release
quickly approachingdone, it is time to make a list of features we would like to see afterwards.app.plugin(mountPlugin, {app: fooApp, path: '/prefix'})
)ctx.foo.bar(...)
)Mojo::URL
)ctx.proxyGet()
,ctx.proxyRequest()
)ctx.urlForAsset('foo.js')
returns/static/assets/foo.abcd1234.js
)foo.development.js
)http+unix://...
)http+unix://...
)colorFieldTag
dateFieldTag
datetimeFieldTag
emailFieldTag
fileFieldTag
hiddenFieldTag
labelFor
monthFieldTag
numberFieldTag
passwordFieldTag
rangeFieldTag
searchFieldTag
selectFieldTag
(⚠️ quite complex)telFieldTag
textFieldTag
timeFieldTag
urlFieldTag
weekFieldTag
--ts
flag)perl -Mojo -E '...'
equivalent (something better thannpx mojo eval -v '...'
?)