Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

Jetpack Scan enqueues incorrect script in some cases, causing 404 errors #35634

Open alexsanford opened 7 months ago

alexsanford commented 7 months ago

Impacted plugin

Jetpack

Quick summary

Jetpack Scan enqueues a script in certain cases which does not exist. This causes 404 errors to occur. This can be reproduced by manually deleting a transient, but it is being triggered in the wild in at least one case.

Steps to reproduce

  1. On a site with Jetpack Scan active, use the WordPress console to run delete_transient('jetpack_scan_state');
  2. Reload the Jetpack dashboard and notice a 404 error to the path /wp-content/plugins/jetpack/modules/scan/_inc/build/scan/admin-bar-notice.min.js?minify=false&ver=1

A clear and concise description of what you expected to happen.

The non-existent script should never be enqueued.

What actually happened

No response

Impact

Some (< 50%)

Available workarounds?

There is no user impact

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

alexsanford commented 7 months ago

The script appears to be enqueued here: https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/modules/scan/class-admin-bar-notice.php#L108-L120

jeherve commented 7 months ago

The bug was most likely introduced in #34072. #35648 should fix things.

pehaa commented 7 months ago

reported 7725222-zd-a8c

github-actions[bot] commented 7 months ago

Support References

This comment is automatically generated. Please do not edit it.

StefMattana commented 6 months ago

Another report in the forum: https://wordpress.org/support/topic/jetpack-create-errors-accessing-non-existing-files-ws-iframe-html/

github-actions[bot] commented 2 weeks ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.