mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:18:41 +00:00
fix: cjk chars in filename
This commit is contained in:
parent
4140e2f4f0
commit
3b109b96b2
@ -6,7 +6,7 @@ ENV USE_MIRROR $USE_MIRROR
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV PKGS="php7.4 php7.4-yaml php7.4-xml php7.4-dev php7.4-zip php7.4-mysql php7.4-mbstring php7.4-gd php7.4-curl php7.4-imagick libseccomp-dev git vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile php-pear mysql-client build-essential fp-compiler re2c libseccomp-dev libyaml-dev python2.7 python3.10 python3-requests openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk"
|
ENV PKGS="php7.4 php7.4-yaml php7.4-xml php7.4-dev php7.4-zip php7.4-mysql php7.4-mbstring php7.4-gd php7.4-curl php7.4-imagick libseccomp-dev git vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile php-pear mysql-client build-essential fp-compiler re2c libseccomp-dev libyaml-dev python2.7 python3.10 python3-requests openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk language-pack-zh*"
|
||||||
RUN if [[ "$USE_MIRROR" == "1" ]]; then\
|
RUN if [[ "$USE_MIRROR" == "1" ]]; then\
|
||||||
sed -i "s@http://.*archive.ubuntu.com@https://mirrors.aliyun.com@g" /etc/apt/sources.list &&\
|
sed -i "s@http://.*archive.ubuntu.com@https://mirrors.aliyun.com@g" /etc/apt/sources.list &&\
|
||||||
sed -i "s@http://.*security.ubuntu.com@https://mirrors.aliyun.com@g" /etc/apt/sources.list ;\
|
sed -i "s@http://.*security.ubuntu.com@https://mirrors.aliyun.com@g" /etc/apt/sources.list ;\
|
||||||
|
@ -37,10 +37,10 @@ define('FM_ROOT_URL', UOJProblem::cur()->getResourcesBaseUri());
|
|||||||
$sub_path = UOJRequest::get('sub_path', 'is_string', '');
|
$sub_path = UOJRequest::get('sub_path', 'is_string', '');
|
||||||
|
|
||||||
if ($sub_path) {
|
if ($sub_path) {
|
||||||
$filepath = realpath(UOJProblem::cur()->getResourcesPath($sub_path));
|
$filepath = realpath(UOJProblem::cur()->getResourcesPath(rawurldecode($sub_path)));
|
||||||
$realbasepath = realpath(UOJProblem::cur()->getResourcesPath());
|
$realbasepath = realpath(UOJProblem::cur()->getResourcesPath());
|
||||||
|
|
||||||
if (!str_starts_with($filepath, $realbasepath)) {
|
if (!strStartWith($filepath, $realbasepath)) {
|
||||||
UOJResponse::page406();
|
UOJResponse::page406();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
setlocale(LC_ALL, 'zh_CN.UTF-8', 'C.UTF-8');
|
||||||
|
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/app/vendor/autoload.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/app/vendor/autoload.php';
|
||||||
require $_SERVER['DOCUMENT_ROOT'] . '/app/libs/uoj-lib.php';
|
require $_SERVER['DOCUMENT_ROOT'] . '/app/libs/uoj-lib.php';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user