mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: fix #973
This commit is contained in:
4 files changed
+60
-46
No files matched your search
@@ -24,7 +24,12 @@ export default class TelegramService extends Service {
|
||||
icon,
|
||||
canRegister: config.canRegister,
|
||||
callback: async function callback({ payload }) {
|
||||
const parsed = JSON.parse(payload);
|
||||
let parsed;
|
||||
try {
|
||||
parsed = JSON.parse(payload);
|
||||
} catch (e) {
|
||||
throw new ForbiddenError('Invalid payload');
|
||||
}
|
||||
const hash = parsed.hash;
|
||||
delete parsed.hash;
|
||||
const dataCheckString = Object.keys(parsed).sort().map((key) => (`${key}=${parsed[key]}`)).join('\n');
|
||||
|
||||
Reference in new issue
Block a user