core: prevent attribute truncation side-effects#11503
Conversation
7a9da98 to
fdcf489
Compare
fdcf489 to
580f15f
Compare
patrickhulce
left a comment
There was a problem hiding this comment.
Thanks for picking this up @csabapalfi!
Any ideas for a test for this? I'm struggling to come up with one that would actually catch this given our current infrastructure since it's only really observable on the server's side and we've stopped recording network requests in Lighthouse when this happens :/
impl LGTM though 🎉
5c35fc0 to
b736af3
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
b736af3 to
d0f13db
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
patrickhulce
left a comment
There was a problem hiding this comment.
thanks @csabapalfi! I filed #11506 for us to eventually follow up with a way to test this.
|
Thanks for the feedback and for merging it so quickly :) |
|
@patrickhulce Do you maybe know if there's any chance this can somehow still make it into 6.4.0? |
No, sorry 6.4.0 finalized yesterday. Given that the issue has been around for several minor versions, I don't think it would qualify for an urgent, dedicated 6.4.1 release. |
|
Ok, thanks! Makes sense. |
|
@csabapalfi it's your lucky day we're actually shipping a 6.4.1 due to a separate problem in #11513 😄 |
|
Amaaazing! Thanks! 😎 |
Summary
This is a bug fix for attribute truncation that introduced unwanted additional requests to truncated URLs (e.g when truncating image src).
This PR makes sure that the
getOuterHTMLSnippetpage function appends the cloned element (used for manipulating attributes) to atemplateelement to prevent any side effects (as proposed by @paulirish here: #11465 (comment))Confirmed the fix by running my branch against this example repo: https://github.com/joshmcarthur/lighthouse-requesting-ellipsied-urls-repro
Related Issues/PRs
fixes #11465
#11244
#10984