Skip to content

use only alias field properties #340

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

Merged
merged 2 commits into from
Apr 12, 2022
Merged

use only alias field properties #340

merged 2 commits into from
Apr 12, 2022

Conversation

vankop
Copy link
Member

@vankop vankop commented Apr 4, 2022

prevent checking object prototype properties

fixes #118

prevent checking object prototype properties
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #340 (6460447) into main (c960801) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
- Coverage   95.06%   95.05%   -0.01%     
==========================================
  Files          39       39              
  Lines        1620     1618       -2     
==========================================
- Hits         1540     1538       -2     
  Misses         80       80              
Impacted Files Coverage Δ
lib/AliasFieldPlugin.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c960801...6460447. Read the comment docs.

@vankop
Copy link
Member Author

vankop commented Apr 4, 2022

it exports/imports field we using enumerable keys only, so it should be safe

Comment on lines 57 to 60
: Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest.replace(/^\.\//, "")
)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
: Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest.replace(/^\.\//, "")
)
: innerRequest.startsWith("./") && Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest.slice(2)
)

@webpack-bot
Copy link

@vankop Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@sokra
Copy link
Member

sokra commented Apr 12, 2022

Thanks

@sokra sokra merged commit 23c3e7c into main Apr 12, 2022
@sokra sokra deleted the fix/issues-118 branch April 12, 2022 09:32
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.

AliasFieldPlugin.apply + lodash: resolving the wrong toString
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy