10up / distributor

Share content between your websites.
https://distributorplugin.com
GNU General Public License v2.0
618 stars 156 forks source link

Add check for internal connection #1225

Closed kirtangajjar closed 1 month ago

kirtangajjar commented 1 month ago

Description of the Change

Adds a check to see if a connection is internal and if it's not, exits early.

Closes #1157

How to test the Change

  1. Open a URL with invalid connection id like: admin.php?page=pull&connection_type=external&connection_id=1.
  2. Check debug log and ensure that the no warning is shown.
  3. Open a URL with external connection and open it's screen as in step 1.
  4. Check debug log and ensure that the no warning is shown.
  5. Open a URL with network connection and open it's screen as in step 1
  6. Check debug log and ensure that the no warning is shown.

Changelog Entry

Fixed - Warning on invalid connection id

Credits

Props @kirtangajjar

Checklist:

github-actions[bot] commented 1 month ago

@kirtangajjar thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this?