提交 a1d84179 编辑于 作者: yuudi's avatar yuudi
浏览文件

fix: user-info priv check

上级 97f6ee2a
......@@ -155,7 +155,7 @@
</template>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>var csrf_token = "{{ session['csrf_token'] }}";</script>
......
......@@ -83,7 +83,7 @@
</el-form>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>var csrf_token = "{{ session['csrf_token'] }}";</script>
......
......@@ -43,7 +43,7 @@
</el-tabs>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>var csrf_token = "{{ session['csrf_token'] }}";</script>
......
......@@ -97,7 +97,7 @@
<p><a href="{{ url_for('yobot_user_info', qqid=qqid) }}">查看用户:[[ nickname ]]</a></p>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>var csrf_token = "{{ session['csrf_token'] }}";</script>
......
......@@ -30,7 +30,7 @@
&nbsp;
{% endif -%}
{% endif -%}
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>
......
......@@ -63,7 +63,7 @@
</el-form>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</div>
......
......@@ -56,7 +56,7 @@
</div>
</div>
<footer style="text-align: center">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
<script>
......
......@@ -9,7 +9,7 @@
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.0/theme-chalk/index.css">
</head>
{% if user.qqid != visitor and visitor.authority_group > 100 %}{# 不是本人且不是管理员 -#}
{% if user.qqid != visitor and visitor.authority_group >= 100 %}{# 不是本人且不是管理员 -#}
<body>
<h1>yobot用户信息</h1>
<p>你无权查看这个页面</p>
......
......@@ -57,7 +57,7 @@
</div>
<p><a href="{{ url_for('yobot_about') }}">关于yobot</a></p>
<footer style="position: absolute;bottom: 0;left: 50%;transform: translate(-50%, -50%);">
powered by <a href="https://github.com/yuudi/yobot">yobot</a>
powered by <a href="https://github.com/pcrbot/yobot">yobot</a>
</footer>
</body>
<script>
......
......@@ -172,7 +172,7 @@ class ClanBattle:
except Exception as e:
_logger.exception('获取群成员列表错误'+str(type(e))+str(e))
asyncio.ensure_future(self.api.send_group_msg(
group_id=group_id, message='获取群成员错误,这可能是缓存问题,请后再试'))
group_id=group_id, message='获取群成员错误,这可能是缓存问题,请重启酷Q后再试'))
return []
return group_member_list
......
......@@ -49,6 +49,8 @@ class Consult:
row = line.split(",")
for col in row:
self.nickname_dict[col] = (row[0], row[1])
self.output_foler = os.path.join(self.setting['dirname'], 'output')
self.output_num = len(os.listdir(self.output_foler))
async def update_nicknames(self):
nickfile = os.path.join(self.setting["dirname"], "nickname3.csv")
......@@ -117,10 +119,9 @@ class Consult:
search_source=search_source,
)
output_foler = os.path.join(self.setting['dirname'], 'output')
num = len(os.listdir(output_foler)) + 1
filename = 'solution-{}-{}.html'.format(num, random.randint(0, 999))
with open(os.path.join(output_foler, filename), 'w', encoding='utf-8') as f:
self.output_num += 1
filename = 'solution-{}-{}.html'.format(self.output_num, random.randint(0, 999))
with open(os.path.join(self.output_foler, filename), 'w', encoding='utf-8') as f:
f.write(page)
addr = urljoin(
self.setting['public_address'],
......
......@@ -192,7 +192,7 @@ class Login:
if user.privacy >= MAX_TRY_TIMES:
raise ExceptionWithAdvice(
'您的密码错误次数过多,账号已锁定',
f'如果忘记密码,请私聊机器人“{self._get_prefix()}解除锁定”后,重新登录'
f'请私聊机器人“{self._get_prefix()}重置密码”后,重新登录'
)
if not user.password == _add_salt_and_hash(pwd, user.salt):
user.privacy += 1 # 密码错误次数+1
......
......@@ -333,7 +333,6 @@ def get_version(base_version: str, base_commit: int) -> dict:
"ver_id": 3300 + base_commit,
"check_url": [
"https://gitee.com/yobot/yobot/raw/master/docs/v3/ver.json",
"https://yuudi.github.io/yobot/v3/ver.json",
]
}
try:
......@@ -371,7 +370,6 @@ def get_version(base_version: str, base_commit: int) -> dict:
"ver_id": 3300 + base_commit,
"check_url": [
"https://gitee.com/yobot/yobot/raw/master/docs/v3/ver.json",
"https://yuudi.github.io/yobot/v3/ver.json",
],
}
except Exception as e:
......
......@@ -92,7 +92,7 @@ class Clan_challenge(_BaseModel):
challenge_pcrtime = IntegerField()
boss_cycle = SmallIntegerField()
boss_num = SmallIntegerField()
boss_health_ramain = BigIntegerField()
boss_health_ramain = BigIntegerField() # MMP拼错了,没法改了
challenge_damage = BigIntegerField()
is_continue = BooleanField() # 此刀是结余刀
message = TextField(null=True)
......
......@@ -33,8 +33,8 @@ else:
class Yobot:
Version = "[v3.6.3]"
Version_id = 199
Version = "[v3.6.4]"
Version_id = 200
# "git rev-list --count HEAD"
def __init__(self, *,
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册