universaloj / uoj-system Goto Github PK
View Code? Open in Web Editor NEWUniversal Online Judge (Community Edition)
Home Page: https://UniversalOJ.github.io/
License: MIT License
Universal Online Judge (Community Edition)
Home Page: https://UniversalOJ.github.io/
License: MIT License
下面是我的几个配置文件的部分内容(相同密码部分已被替换):
uoj:/opt/uoj/judger/.conf.json
{
"uoj_protocol": "http",
"uoj_host": "127.0.0.1",
"judger_name": "main_judger",
"judger_password": "password1",
"socket_port": 2333,
"socket_password": "password2"
}
uoj:/opt/uoj/web/app/.config.php
'judger' =>
array (
'socket' =>
array (
'port' => 2333,
'password' => 'password2',
),
),
其中数据库中设置的 main_judger
的密码是 password1
。
现在的问题是对于所有提交代码均会显示 Judgement Failed,检查了一下,发现是 all.zip 为空导致解压失败。
请问是不是这里的配置错了。
研究了一下UOJ的升级思路,主要考虑通过导出数据升级。
.config.php
,并找出其中需要保留的salt,导入新系统的.config.php
中。/var/svn/problem/
文件夹和/var/uoj_data/
文件夹,原封不动的再导回到新系统中。正在尝试,如果可行的话看看能不能写成脚本。
As mentioned in https://vfleaking.github.io/uoj/problem/ how we should configure an interactive, it is required to have a subdirectory "require" which contains "implementer.cpp" and other files needed when compiling.
However, svn has been removed and uploading with zip will drag all files in subdirectories to the root directory, which leads to an error failing to find require/implementer.cpp when compiling.
MySQL 的 utf8 这个 character set 有问题,utf8mb4 才是真正的 utf8,虽然可能平常中文也够用了。
如题。
能否支持赛中 Hack?
制作方法:克隆仓库后,根据install/bundle目录下的Dockerfile制作镜像(docker build -t uoj_test .),建立出来的容器经检查,至少存在以下BUG:
(建议在合并到master以前对基本功能进行测试,master中一般是要保证稳定能用的QWQ
现在 UOJ 的题目数据管理功能十分不完善,很多操作非常麻烦,很影响使用心情。
大概有这么几个方面
https://bdoj.learningman.top/submission/13
全新安装后无法编译Java程序,在uoj.ac编译通过
相对而言部分语法更加准确,
例如 c++14
特性 const int mod=998'244'353;
highlightjs能将其解析为数字,uoj暂时不行,
以及highlightjs能自动识别'C++17'等为‘cpp',方便后续添加,样式也能自定义
我想写一个命令行工具使用
首页里的 "UOJ-" 前缀在容器的 /var/www/uoj/app/controllers/index.php
的第四行
<?php echoUOJPageHeader('UOJ') ?>
有意义的好像就这些了……
RT,如果使用https,CSS等资源文件无法加载,因为他们的URL是http,被浏览器阻止了
如题,使用的操作系统为Ubuntu 18.04(VMWare),且使用 https://blog.csdn.net/tham_/article/details/73477255/ 和 https://blog.csdn.net/tham_/article/details/73477255/两个教程来部署uoj(主要是根据第一个教程添加了KodExplorer和phpMyAdmin,并且是直接用apt install docker.io
安装的docker)
部署完成后一切运转正常,可以添加题目(没有乱码)。然而就在使用docker restart uoj
重启后,所有重启前的题目的中文字乱码(变成了'?'),且新建题目、提交代码无效。目测是mysql出了问题,请问如何解决...
有看到uoj网站A+B问题
http://uoj.ac/download.php?type=problem&id=1
这个链接可以正常下载数据
但是自己测试添加测试问题后
http://xxx/download.php?type=problem&id=1
该链接打开为404错误
是需要额外配置什么吗?
需要提供一个更新功能,使得社区版用户可以随时更新到最新版本;同时为原版用户提供过渡到社区版的功能。
大概分这几步:
现在各种情况不太确定,例如是否强制自动升级。
预想的方案是,在 https://univsersaloj.github.io/update 里面写一个json,用于提供最新的release版本信息;对于重要安全更新,强制自动升级。
Some of the links are using relative address, which may cause some bugs.
For example, in web/app/controllers/contests.php
almost all of the links are using relative addresses. You can see this at Contests - Universal Online Judge.
Using HTML::url()
to generate these links can solve this problem.
部分链接使用的是相对地址,可能造成一些问题。
例如,在 web/app/controllers/contests.php
中,几乎所有的链接都是相对链接。可以参考 比赛 - Universal Online Judge。
使用 HTML::url()
生成这些链接即可解决问题。
之后会修,先记在这里(
当输入输出数据,或者选手输出中出现 UTF-8 时,可能会导致 Judgement Fault。
当输入数据、输出数据、选手输出之一为下面的内容时:(请注意其中‘
为右单引号)
I don’t know.
Seven
Seven
I don’t know.
Seven
I don’t know.
Seven
I don’t know.
Seven
I don’t know.
Seven
即会导致 Judgement Fault.
此 bug 可以在 UOJ 社区版复现。原版 UOJ 尚未测试,但 uoj.ac 上不能复现。
在评测机的 c++ 部分, 程序根据字符数截取文件内容,从而生成评测结果中的数据预览。(judger/uoj_judger/include/uoj_judger.h:71
)
预览默认的长度为 100,当在结尾处恰巧出现一个 UTF-8 字符时,可能会将这个 UTF-8 字符拦腰截断。当 Python 部分的 judge_client
将 judger/uoj_judger/result/result.txt
文件发送到 web 端时,遇到这个一半的 UTF-8 字符时,会报错:
Traceback (most recent call last):
File "/opt/uoj/judger/judge_client", line 379, in judger_loop
res = judge()
File "/opt/uoj/judger/judge_client", line 262, in judge
return get_judger_result()
File "/opt/uoj/judger/judge_client", line 177, in get_judger_result
line = fres.readline()
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
从而导致 Judgement Fault。
请问原代码中的
install/compose/docker-compose.yml
文件可以直接使用吗
不想用整个的大镜像
当后创建的比赛先结束的时候会导致rating变化图乱跳,对于有咕咕咕习俗的学校很不友好
Java7是Dangerous Syscalls
Java8是Compiler Dangerous Syscalls
例如在 problem_data_manage.php
中,有一个修改提交记录可视权限的 view_type_form
。在浏览器里可以 F12 在里面加入新的 <option>
并提交,不会报错,结果会被加入 extra_config
。(虽然这个值本身就可以在那个页面下面手写 json
改动)
虽然可以(似乎也应该)在 handle
里手动检测 $_POST
传入的值是不是可行的,但是希望 addVSelect
能够检查错误的选项
由于需要断网比赛,在线的库无法使用
由于编译器更新,现在UOJ社区版的C++似乎会自动变成C++ 14之类的。可否考虑手动加上编译选项变成C++ 03来跟赛场环境保持一致?
不过现在noi也开C++11了。。所以有三套方案。
不知道那套方案好
RT
用的Ubuntu系统,刷新了几次结果LaTeX没有渲染,还是显示原文本,有时候会出现[Mathjax Processing Error]
(差不多是这个意思吧,我忘了原文是什么了)
将docker多次重启后似乎也没用
在搭建完uoj后,我尝试添加了题目。
我发现当输入$$后,语法框内的数学语言自动换行左对齐。而正常而言应当是行内公式。
对此我毫无头绪,望解答,谢!
如题,找回密码功能无法使用。访问forgotpw页面会导致500错误。
点开横条可以比对到测试数据,有没有办法禁止点开,或者用什么其他方法来防止数据暴露呢。
现有的密码处理是客户端将client_salt
作为密钥对密码进行HMACmd5,服务端将用户名和HMAC拼接后计算MD5。但是已知密钥HMAC安全性相当于MD5,而MD5保存密码容易破解。
建议:
在修改个人信息的页面登出会自动弹出登录页面,但没法登录进去
怎么更新网站的logo,还有怎么管理用户(比如删除用户)
部署了UOJ,用了其他用户名注册,发现不是管理员,但是root用户的密码不知道
虽然这样其实好像挺好。。。不过在 vfk 的文档 下说的是只有超级管理员能这样做
在 SvnSyncProblemDataHandler
类的 handle
方法中有一个判断有没有 use_builtin_judger
的 if
,其中 else
中会判断用户是不是超级管理员(isSuperUser
),但是似乎有两个问题:
use_builtin_judger
的题目;$this->user
的时候写成了 $user
,NULL
当然不 isSuperUser
啦。所以结果就是所有题目管理员都能上传。可能会造成恶意的题目管理员在 Makefile
里面写上奇怪的东西的后果?
如题,Server Time为正确时间,但博客、提交记录时间错乱(慢了几个小时)
The folder /var/uoj_data stores all the problems' data and it also have the compressed file for each problem. However, all the compressed files have a subfolder called /0. In this way, you can't upload the download file directly without deleting the subfolder /0. This really makes some problems for moving the problems from one UOJ to another UOJ.
也许是我操作不对?
UOJ每次添加题目后必须点击“与SVN仓库同步”,且每次添加完试题后要重新获取SVN仓库地址
这似乎很难完成批量上传试题和数据的脚本
请问有什么参考建议或者解决方案吗?
自己用Ubuntu做了一台本地服务器,但是在局域网访问题目时有时会卡住,很慢。有时又很快,不知道什么原因
从旧版UOJ系统尝试升级
参考了UOJ 系统升级思路,步骤如下:
/var/uoj_data/
至对应目录app_uoj233
后,导入至新数据库security
下的所有salt,与原来的一致现象:无论是否保留新judger
的password
,评测均会卡waiting。请问此类问题如何解决?
操作步骤:保留judger
的password
,重测某提交记录,卡waiting;删除该提交记录,后用原password更新judger
的password
,进行了一次新提交,仍然卡waiting。
非 use_builtin_judger
题上传 zip 数据包后,切换「是否使用 hack」以部署新数据包,此时出现以下提示信息。
Makefile : compile error
make: *** No targets specified and no makefile found. Stop.
比赛名称含有字符 '
(英文单引号)会导致 rating 变化图无法显示。
具体错误:
Uncaught SyntaxError: Invalid or unexpected token
。复现方式:
'
,或者名字中有单个的 '
。在.htaccess
中添加:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^ https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
后无法评测,一直显示Judging
。
不强制跳转时使用http
和https
都能正常评测。
Hey there!
I'd like to report a security issue but cannot find contact instructions on your repository.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
网页显示database出现了错误.
如题,部分isSuperUser限定的代码块中包含了例如backstage这样的功能,是否应该把这些权限下放给比赛拥有者,而不局限于超管?
比如如何添加或者删除标签?我看了.config.php中没有相关的设置。
用 Chrome 打开 http://uoj.ac 时 F12 console界面有如下错误
Unchecked runtime.lastError: The message port closed before a response was received.
这个错误大概每秒重复几百次
导致看几个小时前打开的页面时非常卡
每个UOJ的网页都有这个错误
这个Chrome提示的网页可能对此问题有帮助
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.