Skip to content

Exclude mimetypelist.js from signing/integrity check#29308

Merged
PVince81 merged 2 commits intomasterfrom
fix-29277
Oct 20, 2017
Merged

Exclude mimetypelist.js from signing/integrity check#29308
PVince81 merged 2 commits intomasterfrom
fix-29277

Conversation

@VicDeo
Copy link
Member

@VicDeo VicDeo commented Oct 19, 2017

Description

Adds regex exclusions by path/filename into ExcludeFileByNameFilterIterator

Related Issue

Fixes #29277

Motivation and Context

Signing core/js/mimetypelist.js

How Has This Been Tested?

Unit-tested

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@VicDeo VicDeo added this to the development milestone Oct 19, 2017
@VicDeo VicDeo requested a review from PVince81 October 19, 2017 23:25
@VicDeo VicDeo added the p1-urgent Critical issue, need to consider hotfix with just that issue label Oct 19, 2017
@VicDeo VicDeo self-assigned this Oct 19, 2017
@codecov
Copy link

codecov bot commented Oct 20, 2017

Codecov Report

Merging #29308 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #29308      +/-   ##
============================================
+ Coverage     59.59%   59.59%   +<.01%     
+ Complexity    17170    17169       -1     
============================================
  Files          1029     1029              
  Lines         57238    57234       -4     
============================================
- Hits          34113    34111       -2     
+ Misses        23125    23123       -2
Impacted Files Coverage Δ Complexity Δ
lib/private/IntegrityCheck/Checker.php 92.59% <ø> (+0.62%) 60 <0> (-3) ⬇️
...Check/Iterator/ExcludeFileByNameFilterIterator.php 100% <100%> (ø) 7 <0> (+2) ⬆️

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 558e298...8c8c354. Read the comment docs.

];

$found = false;
foreach ($exclusionList as $entry) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you likely still need to keep something here to prevent generating the hashes in the first place ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@PVince81 generateHashes takes a folder iterator. I excluded this path from the items returned by this iterator.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's reused everywhere, so I basically made core/js/mimetypelist.js completely invisible for signing code. See

private function generateHashes(\RecursiveIteratorIterator $iterator,

$currentInstanceHashes = $this->generateHashes($this->getFolderIterator($basePath), $basePath);

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍 thanks for clarifying

@PVince81 PVince81 merged commit 0ab73e1 into master Oct 20, 2017
@PVince81 PVince81 deleted the fix-29277 branch October 20, 2017 08:50
@PVince81
Copy link
Contributor

@VicDeo please backport to stable10

@VicDeo
Copy link
Member Author

VicDeo commented Oct 20, 2017

Stable10: #29316

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3 - To Review p1-urgent Critical issue, need to consider hotfix with just that issue status/STALE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrity check fail 10.0.4RC1 on mimetype file

3 participants