Shopware 6的路径名生成为什么会有这个黑名单?

Why is there this blacklist in the path name generation of Shopware 6?

在挖掘 Shopware 6 中生成图像路径名的代码时,我发现它们会生成一个 MD5 和,然后删除某些值。

看这里:

https://github.com/shopware/platform/blob/efe7b8ae224c1ef5601c43ff465a9dd5908aa8d3/src/Core/Content/Media/Pathname/PathnameStrategy/AbstractPathNameStrategy.php#L14

private $blacklist = [
    'ad' => 'g0',
];


...


protected function generateMd5Path(string $fromValue): string
{
    $md5hash = md5($fromValue);

    $md5hashSlices = \array_slice(str_split($md5hash, 2), 0, 3);
    $md5hashSlices = array_map(
        function ($slice) {
            return \array_key_exists($slice, $this->blacklist) ? $this->blacklist[$slice] : $slice;
        },
        $md5hashSlices
    );

    return implode('/', $md5hashSlices);
}

这样的代码可能是什么原因? “广告”有什么不好?

我相信名称中带有“ad”的图片路径更有可能被广告拦截器拦截。