21 Star 49 Fork 0

Gitee 极速下载/joomla

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/joomla/joomla-cms
克隆/下载
update_fido_cache.php 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
/**
* @package Joomla.Build
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @phpcs :disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
echo <<< TEXT
Update FIDO Cache version 1.0
Distributed under the GNU General Public License version 2, or at your option
any later version published by the Free Software Foundation.
TEXT;
if (!isset($fullPath)) {
$fullPath = dirname(__DIR__);
}
$filePath = rtrim($fullPath, '\\/') . '/plugins/system/webauthn/fido.jwt';
if (is_file($filePath) && filemtime($filePath) > (time() - 864000)) {
echo "The file $filePath already exists and is current; nothing to do.\n";
exit(0);
}
echo "Fetching FIDO metadata statements...\n";
$context = stream_context_create([
'http' => [
'method' => 'GET',
'follow_location' => 1,
'timeout' => 5.0,
],
]);
$rawJwt = @file_get_contents('https://mds.fidoalliance.org/', false, $context);
if ($rawJwt === false) {
echo "Could not get an updated fido.jwt file.\n";
return;
}
echo "Saving JWT file in the plugin directory...\n";
file_put_contents($filePath, $rawJwt);
echo "File saved: $filePath\n";
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/mirrors/joomla.git
git@gitee.com:mirrors/joomla.git
mirrors
joomla
joomla
4.4.0-beta3

搜索帮助

371d5123 14472233 46e8bd33 14472233