Skip to content
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

✨ amp-script: implement new size limits for sandboxed scripts #38185

Merged
merged 1 commit into from
May 11, 2022

Conversation

zshnr
Copy link
Contributor

@zshnr zshnr commented May 11, 2022

Fixes: #38173

Creates a separate size limit for scripts running in sandboxed mode. Includes updating the sizeLimitExceeded function to correctly accumulate and calculate size limit based on whether the script being checked is running in sandboxed mode or not.

Also updates the documentation to reflect this change.

@amp-owners-bot amp-owners-bot bot requested a review from samouri May 11, 2022 17:42
@zshnr
Copy link
Contributor Author

zshnr commented May 11, 2022

cc @jridgewell

@jridgewell jridgewell enabled auto-merge (squash) May 11, 2022 17:56
@jridgewell jridgewell merged commit 8e8f82c into ampproject:main May 11, 2022
@zshnr zshnr deleted the amp-script-size-increase branch May 11, 2022 17:59
Copy link
Member

@samouri samouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating the documentation as well! ⭐


Note: Not to be confused with the **sandbox** attribute.

If set, this will signal that worker-dom should activate sandboxed mode. In this mode the Worker lives in its own crossorigin iframe, creating a strong security boundary. It also forces **nodom** mode. Because of the strong security boundary, sandboxed scripts do not need to provide a script hash.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@zshnr
Copy link
Contributor Author

zshnr commented May 11, 2022

Thank you for updating the documentation as well! ⭐

My pleasure 😄

westonruter added a commit that referenced this pull request May 20, 2022
…a-menu-images-validator-spec

* 'main' of github.com:ampproject/amphtml: (90 commits)
  🔥 [Story mediapool] Fix videos from mediapool with `noaudio` don't have audio when reused. (#38216)
  Hide progress bar on the control group of auto advance experiment (#38215)
  ✨ Add Bento Autocomplete Component (#37837)
  🌐 [Story subscription] Subscription localization async (#38204)
  Dable: add new optional parameter "channel" (#38199)
  ✨ [AMP Story Paywall] Enable developers to specify a custom subscriptions page index (#38175)
  SwG Release 0.1.22.217 (#38187)
  amp-script: implements new size limits for sandboxed scripts (#38185)
  🖍  Hide the system layer and progress bar in preview mode (#38163)
  added minItems (#38177)
  Prevent expandTemplate from ReDOSing (#38178)
  Change amp-story-subscriptions attribute name to reflect its flexibility (#38176)
  🐛 [Story Preview] Enable amp-video to play in preview mode (#38149)
  Added the possibility to get page count to story messaging api (#38170)
  SwG Release 0.1.22.216 (#38168)
  Allow @newmuis to update OWNERS files (#38169)
  ✨ Add Richaudience to RTC callout vendors (#38160)
  🚀  SunMedia: Update amp-ad (#38128)
  Remove option to deploy PR artifacts to a static website (#38152)
  added some vars and requests in gfksensic.json (#37722)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I2I: Increase amp-script size limit for sandboxed scripts
4 participants