-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security fixes #1983
Security fixes #1983
Conversation
The ClipboardJS plugin is accessible. Didn't add more, because this doubles up the amount of info for the screenreader. |
f85ccb2
to
870c61a
Compare
@zackkatz I think this is it for GravityView. Unfortunately since short codes are so specific per plugin, I don't really see an abstraction to extract. At least for gravityview I've consolidated it on the This doesn't include a filter for returning views visible only for the current user. Not sure if that should be a fix on its own. |
I'm not sure how we should filter the views from the list. We can only do this based on a capability I guess, but those are not settable per post per user. This is what I came up with, but Maybe someone has a good idea. // in `GravityKit\GravityView\Gutenberg\Blocks::get_views()`
// Remove views the current user cannot edit.
$views = array_filter(
$views,
static function ( $view ) {
return GravityView_Roles_Capabilities::has_cap( 'gravityview_edit_entry', $view->ID );
}
); |
@doekenorg, could you please:
|
f477b0d
to
e6f33ea
Compare
@doekenorg, in GravityExport Lite and GravityCalendar we display a notice to admin users when there is a missing (but expected) secret key:
For consistency purposes, let's do the same here. |
@mrcasual only the unit test thing remains; but I think this can be released. |
@doekenorg, please hide the "click to copy" completely :) Instead, add |
@doekenorg, copying to clipboard works great. Let's implement #1983 (comment) and we can then merge this. |
@mrcasual allright, that's in there. I used a WP_Error to be consistent; and not introduce an The notice is generic because it is re-used for different short codes ( |
@doekenorg I just noticed that, on the "All Views" page, in the shortcode column, it says "Copied!" even before clicking on it. |
This was a styling issue; cached CSS. |
secret
to short code usesecret
to view blockgventry
tag short code.This PR fixes the Security issue of enumerating on views based on their ID.
It adds a setting to enable this for a view, with the default for new views being set to

on
It the possibility to copy the short code instead of just selecting it.

It also fixes a bug where the GravityView capabilities for a role were overwritten on every admin request.