mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: domain bind register fix
This commit is contained in:
1 parent
2c2f0366a9
commit
f4dca478be
4 files changed
+10
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.29.34",
|
"version": "2.29.35",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export class UserRegisterHandler extends Handler {
|
|||||||
if (system.get('smtp.verify') && system.get('smtp.user')) {
|
if (system.get('smtp.verify') && system.get('smtp.user')) {
|
||||||
const m = await this.renderHTML('user_register_mail.html', {
|
const m = await this.renderHTML('user_register_mail.html', {
|
||||||
path: `register/${t[0]}`,
|
path: `register/${t[0]}`,
|
||||||
url_prefix: (this.domain.host || [])[0] || system.get('server.url'),
|
url_prefix: (this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host) || system.get('server.url'),
|
||||||
});
|
});
|
||||||
await sendMail(mail, 'Sign Up', 'user_register_mail', m);
|
await sendMail(mail, 'Sign Up', 'user_register_mail', m);
|
||||||
this.response.template = 'user_register_mail_sent.html';
|
this.response.template = 'user_register_mail_sent.html';
|
||||||
@@ -154,7 +154,7 @@ class UserLostPassHandler extends Handler {
|
|||||||
);
|
);
|
||||||
const m = await this.renderHTML('user_lostpass_mail.html', {
|
const m = await this.renderHTML('user_lostpass_mail.html', {
|
||||||
url: `lostpass/${tid}`,
|
url: `lostpass/${tid}`,
|
||||||
url_prefix: this.domain.host || system.get('server.url'),
|
url_prefix: (this.domain.host instanceof Array ? this.domain.host[0] : this.domain.host) || system.get('server.url'),
|
||||||
uname: udoc.uname,
|
uname: udoc.uname,
|
||||||
});
|
});
|
||||||
await sendMail(mail, 'Lost Password', 'user_lostpass_mail', m);
|
await sendMail(mail, 'Lost Password', 'user_lostpass_mail', m);
|
||||||
|
|||||||
@@ -357,7 +357,12 @@ export class HandlerCommon {
|
|||||||
try {
|
try {
|
||||||
const { anchor } = args;
|
const { anchor } = args;
|
||||||
if (args.domainId) name += '_with_domainId';
|
if (args.domainId) name += '_with_domainId';
|
||||||
else if ((!this.request.host || this.domain?.host !== this.request.host) && this.domainId !== 'system') {
|
else if (this.domainId !== 'system' && (
|
||||||
|
!this.request.host
|
||||||
|
|| (this.domain?.host instanceof Array
|
||||||
|
? (!this.domain.host.includes(this.request.host))
|
||||||
|
: this.domain.host !== this.domain?.host)
|
||||||
|
)) {
|
||||||
name += '_with_domainId';
|
name += '_with_domainId';
|
||||||
args.domainId = this.domainId;
|
args.domainId = this.domainId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.13.1",
|
"version": "4.13.2",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
Reference in new issue
Block a user