MRBS 1.12.2 等保2.0二级整改完整提交
包含:登录失败锁定、90天密码有效期、30分钟会话超时、 强制改密、登录审计日志、屏幕水印、企业背景图、 备案信息固定底部、favicon、JS空集合保护、 会话过期体验优化(403 JSON)、display_errors 关闭、 固定 key 根治 Integrity check failed 等全部改动 注意:config.inc.php/.htaccess/.user.ini 含敏感信息, 通过 .gitignore 排除,勿推送到公开仓库。
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Class QRMarkupHTML
|
||||
*
|
||||
* @created 06.06.2022
|
||||
* @author smiley <smiley@chillerlan.net>
|
||||
* @copyright 2022 smiley
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace chillerlan\QRCode\Output;
|
||||
|
||||
use function implode;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* HTML output (a cheap markup substitute when SVG is not available or not an option)
|
||||
*/
|
||||
class QRMarkupHTML extends QRMarkup{
|
||||
|
||||
public const MIME_TYPE = 'text/html';
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function createMarkup(bool $saveToFile):string{
|
||||
$rows = [];
|
||||
$cssClass = $this->getCssClass();
|
||||
|
||||
foreach($this->matrix->getMatrix() as $row){
|
||||
$element = '<span style="background: %s;"></span>';
|
||||
$modules = array_map(fn(int $M_TYPE):string => sprintf($element, $this->getModuleValue($M_TYPE)), $row);
|
||||
|
||||
$rows[] = sprintf('<div>%s</div>%s', implode('', $modules), $this->eol);
|
||||
}
|
||||
|
||||
$html = sprintf('<div class="%1$s">%3$s%2$s</div>%3$s', $cssClass, implode('', $rows), $this->eol);
|
||||
|
||||
// wrap the snippet into a body when saving to file
|
||||
if($saveToFile){
|
||||
$html = sprintf(
|
||||
'<!DOCTYPE html><html lang="none">%2$s<head>%2$s<meta charset="UTF-8">%2$s'.
|
||||
'<title>QR Code</title></head>%2$s<body>%1$s</body>%2$s</html>',
|
||||
$html,
|
||||
$this->eol
|
||||
);
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user