Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf105b5a

Browse files
bug#51030 [Intl] Fixed directory traversal in emoji compression tool (rlandgrebe)
This PR was merged into the 6.3 branch.Discussion----------[Intl] Fixed directory traversal in emoji compression toolWhen using the compression tool, the emoji data is not compressed properly due to directory traversal issues. It only goes one level deep in the `data' directory.| Q | A| ------------- | ---| Branch? | 6.3 <!-- see below -->| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets |Fix#51029 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->| License | MIT| Doc PR | <!-- required for new features --><!--Replace this notice by a short README for your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Commits-------da26542 [Intl] Fixed directory traversal in emoji compression tool
2 parentsa451ae5 +da26542 commitf105b5a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎.github/workflows/intl-data-tests.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ jobs:
8484
run:|
8585
[ -f src/Symfony/Component/Intl/Resources/data/locales/en.php ]
8686
[ ! -f src/Symfony/Component/Intl/Resources/data/locales/en.php.gz ]
87+
[ -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php ]
88+
[ ! -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php.gz ]
8789
src/Symfony/Component/Intl/Resources/bin/compress
8890
[ ! -f src/Symfony/Component/Intl/Resources/data/locales/en.php ]
8991
[ -f src/Symfony/Component/Intl/Resources/data/locales/en.php.gz ]
92+
[ ! -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php ]
93+
[ -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php.gz ]
9094
./phpunit src/Symfony/Component/Intl

‎src/Symfony/Component/Intl/Resources/bin/compress‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ if (!extension_loaded('zlib')) {
1717
thrownewException('This script requires the zlib extension.');
1818
}
1919

20-
foreach (glob(dirname(__DIR__).'/data/*/*.php')as$file) {
21-
if ('meta.php' ===basename($file)) {
20+
$iterator =newRecursiveIteratorIterator(
21+
newRecursiveDirectoryIterator(
22+
dirname(__DIR__).'/data',
23+
FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS
24+
)
25+
);
26+
27+
foreach ($iteratoras$file) {
28+
if ('php' !==$file->getExtension() ||'meta.php' ===$file->getFilename()) {
2229
continue;
2330
}
2431

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp