Skip to content

Sync main to develop after v2.5.1 release - #2257

Merged
subodhr258 merged 26 commits into
developfrom
sync/main-to-develop-2.5.1
Oct 28, 2026
Merged

subodhr258 merged 26 commits into
developfrom
sync/main-to-develop-2.5.1

Conversation

@subodhr258

Copy link
Copy Markdown
Collaborator

Post-release back-sync of main into develop after the 2.5.1 release (tag 2.5.1 at 976463937).

This one carries code. The 2.5.1 security fixes were merged straight into main, so develop doesn't have them yet:

No conflicts. develop only had the Marketo form layer (#2218) since the 2.5.0 sync, and it merged cleanly (merge commit df0387e62 on this branch).

Checked on the merge commit: JS unit tests 51 suites / 690 tests pass and the production build passes. PHP unit tests: 936 run, and the only errors are 25 PHP 8.5 notices that setAccessible() is deprecated in older test files, the same on main and develop.

develop now reports 2.5.1. Its own @since n.e.x.t tags (14, from #2218) stay for the next release.

Release ticket: rtCamp/godam-plugin-wp#68

Merge as a merge commit (sync PR, not squash).

The preview and embed pages, the video shortcode, ad tag and transcoding
status routes, and the video gallery listing now follow WordPress's own
media visibility instead of answering for any media ID.

Media is shown when it is unattached, or when the post it was uploaded to
is published (or has another public status) and has no password the
visitor has not entered. Users who can edit the media always see it, and
users who can read a private or draft parent, or edit a password-protected
one, see its media. Media used on a publicly viewable post counts as
public whichever post it was uploaded to, using the media usage index, so
a video uploaded while drafting one post keeps working in the player,
gallery, lightbox and embed of the published page that uses it. Media a
visitor may not see is treated like a missing ID. The result can be
adjusted with the new rtgodam_can_view_attachment filter.

- rtgodam_can_view_attachment() answers for one attachment; the gallery
  listing applies the same rule in SQL (rtgodam_public_media_query_clauses)
  so paging and counts stay correct.
- The transcoding status route takes at most 100 IDs per request and leaves
  out IDs the user may not see. Reading the status no longer writes: the
  short wait for a thumbnail after transcoding is based on the time of the
  last status update, stored when the status is set, instead of a counter
  incremented on every read. The media library requests statuses in batches
  of 100.
- The rtgodam_meta REST field on attachments returns the stored settings
  only to users who can write posts (for editor previews) or edit the
  attachment.
- Video schema is printed only for posts whose content is public: not
  drafts, private, scheduled or password-protected posts.
- Add unit tests for each of these.
- Deleting a media item removes the transcoded files and thumbnails listed
  in its meta only when they are files inside the uploads folder. Any other
  path in the meta is skipped.
- rtgodam_media_thumbnails and rtgodam_media_transcoded_files are protected
  meta, so XML-RPC custom fields and the custom fields box no longer write
  them. GoDAM keeps saving them with update_post_meta().
- create-media-entry stores a bare file name as the media item's file, with
  no directories, and only saves the url, mpd_url and hls_url values that
  are public http(s) addresses.
- The folder ZIP export adds only files that are inside the uploads folder.
- Add PHPUnit tests for each of the above.
…string

The video embed page, the video-shortcode REST route, the GoDAM Gallery
Elementor widget, the preview page and the entry screens of the Fluent Forms,
WPForms, Everest Forms, SureForms and Gravity Forms recorder fields now hand
their values to the player as an attributes array. A new helper,
rtgodam_render_shortcode_from_atts(), calls the registered shortcode callback
directly, so a value is only ever an attribute value and is never parsed as
shortcode syntax.

- The embed page and the route reduce godam_context and block_source to slug
  characters with sanitize_key(); the route argument uses sanitize_key too.
- Stored recording and transcoded URLs are passed through esc_url_raw().
- The route gets a rtgodam_shortcode_atts filter for the attributes array.
  The rtgodam_shortcode_output filter, which receives the shortcode string, is
  deprecated but still applied when a site uses it; every value in that string
  is now an ID, a slug, 'show'/'hide' or JSON.

The rendered player HTML for normal values is unchanged.

Adds unit tests for the helper, the embed and preview pages, the route, the
Elementor gallery widget and each form plugin's entry view. The tests register
a harmless shortcode and check that extra shortcode text in a value does not
run it, and that a normal value still reaches the player.
The form listing and single-form routes are only called by the Media
Editor, so they now need upload_files, the capability the Media Editor
page requires and the Gravity Forms routes already use. The shared check
moves into the REST base class. The listings return what the form pickers
use: a form's id and title (Forminator: name).

The player shows a Jetpack form, and accepts entries for it, only when
the post that holds the form is published, viewable and has no password.
The Media Editor's Jetpack preview skips a post its user can neither see
nor edit. The Jetpack form submission route stays public, since the
player posts to it.

The MetForm routes and the Jetpack forms listing stay public: they return
only what WordPress already shows visitors (public form posts and the
titles of published posts).
…ock on every route

Reading the media-folder terms over REST now needs a signed-in user who
can write posts (edit_posts), so the gallery block's folder picker keeps
working for Contributors. Creating, changing or deleting folders needs
upload_files. The Media Library folder tree and the block editor run
signed in, so they are unaffected.

The folder lock is applied where a folder changes rather than by matching
one route path:
- The media-folder term routes carry the check on their own permission
  callbacks, so it holds however a request reaches them (letter case,
  ?rest_route=, batch requests). It reads the folder id the way the
  controller does.
- The assign_term capability is refused for a locked folder, which covers
  the core media route's media-folder field. That route also refuses to
  take a file out of a locked folder, as the assign-folder route does.
- A new folder cannot be created inside a locked folder on any route.
- An upload that names a locked folder, or one inside it, still succeeds
  but is left unfiled.

The lock check itself moves to Media_Folder_Utils so these paths share it.
The two requests that send a file to the GoDAM API for transcoding (media
uploads and form recordings) turned certificate verification off. The
setting dates from when the API address was plain http; every other request
to the same API already verifies the certificate.

Both now verify it. A new filter, godam_transcoder_verify_ssl (default
true), lets a local or staging API with a self-signed certificate turn it
off, like the existing godam_frappe_dispatch_verify_ssl filter.
GoDAM's public routes and pages now follow WordPress's media API for
media attached to a password-protected post: it is shown, the same as
media of any published post. The rest is unchanged: media of draft,
pending, private, scheduled and trashed posts stays hidden from visitors,
and media used on a public post still counts as public.

The video schema is still left out of a password-protected post, since
the post's own content is hidden until the password is entered.
Core adds a media-folder-<slug> class for each folder an attachment is in,
and the media route's class_list and attachment pages show those classes
to logged-out visitors. Folder slugs are folder names, so leave the
taxonomy out of the post classes.
… POT

The POT is built from main with all six 2.5.1 fixes merged, so it matches
once they land.
Show media on GoDAM's public routes only where WordPress would show it
Render the GoDAM player from attributes instead of a built shortcode string
Restrict the Media Editor's form routes to users who can open it
Only delete, export and store media files inside the uploads folder
Keep media folders private to signed-in users, and apply the folder lock on every route
Verify the TLS certificate when sending media for transcoding
Release v2.5.1: version bump and changelog
@github-actions

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
13 0 13

⚠️ Warnings (13)

📁 readme.txt (2 warnings)
📍 Line 🔖 Check 💬 Message
0 mismatched_plugin_name Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM".
0 trademarked_term The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name.
📁 assets/build/css/main.css (1 warning)
📍 Line 🔖 Check 💬 Message
0 EnqueuedStylesScope This style is being loaded in all contexts.
📁 assets/src/libs/analytics.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/10/26/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
📁 assets/build/js/main.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/10/26/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@subodhr258
subodhr258 merged commit 546ed45 into develop Oct 28, 2026
5 checks passed
@subodhr258
subodhr258 deleted the sync/main-to-develop-2.5.1 branch October 28, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants