mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-23 13:59:52 +00:00
Remove ALL fosscord mentions
This commit is contained in:
@@ -16,14 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { getIpAdress, route, verifyCaptcha } from "@fosscord/api";
|
||||
import { getIpAdress, route, verifyCaptcha } from "@spacebar/api";
|
||||
import {
|
||||
Config,
|
||||
Email,
|
||||
FieldErrors,
|
||||
ForgotPasswordSchema,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
const router = Router();
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route, random } from "@fosscord/api";
|
||||
import { Config, ValidRegistrationToken } from "@fosscord/util";
|
||||
import { route, random } from "@spacebar/api";
|
||||
import { Config, ValidRegistrationToken } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { getIpAdress, IPAnalysis } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import { getIpAdress, IPAnalysis } from "@spacebar/api";
|
||||
const router = Router();
|
||||
|
||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { getIpAdress, route, verifyCaptcha } from "@fosscord/api";
|
||||
import { getIpAdress, route, verifyCaptcha } from "@spacebar/api";
|
||||
import {
|
||||
adjustEmail,
|
||||
Config,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
LoginSchema,
|
||||
User,
|
||||
WebAuthn,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import crypto from "crypto";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { BackupCode, generateToken, User, TotpSchema } from "@fosscord/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { BackupCode, generateToken, User, TotpSchema } from "@spacebar/util";
|
||||
import { verifyToken } from "node-2fa";
|
||||
import { HTTPError } from "lambert-server";
|
||||
const router = Router();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
generateToken,
|
||||
SecurityKey,
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
verifyWebAuthnToken,
|
||||
WebAuthn,
|
||||
WebAuthnTotpSchema,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { ExpectedAssertionResult } from "fido2-lib";
|
||||
import { HTTPError } from "lambert-server";
|
||||
|
||||
@@ -26,14 +26,14 @@ import {
|
||||
adjustEmail,
|
||||
RegisterSchema,
|
||||
ValidRegistrationToken,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import {
|
||||
route,
|
||||
getIpAdress,
|
||||
IPAnalysis,
|
||||
isProxy,
|
||||
verifyCaptcha,
|
||||
} from "@fosscord/api";
|
||||
} from "@spacebar/api";
|
||||
import bcrypt from "bcrypt";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { MoreThan } from "typeorm";
|
||||
@@ -52,7 +52,7 @@ router.post(
|
||||
// They're a one time use token that bypasses registration limits ( rates, disabled reg, etc )
|
||||
let regTokenUsed = false;
|
||||
if (req.get("Referrer") && req.get("Referrer")?.includes("token=")) {
|
||||
// eg theyre on https://staging.fosscord.com/register?token=whatever
|
||||
// eg theyre on https://staging.spacebar.chat/register?token=whatever
|
||||
const token = req.get("Referrer")?.split("token=")[1].split("&")[0];
|
||||
if (token) {
|
||||
const regToken = await ValidRegistrationToken.findOneOrFail({
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@fosscord/api";
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
checkToken,
|
||||
Config,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
generateToken,
|
||||
PasswordResetSchema,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { getIpAdress, route, verifyCaptcha } from "@fosscord/api";
|
||||
import { getIpAdress, route, verifyCaptcha } from "@spacebar/api";
|
||||
import {
|
||||
checkToken,
|
||||
Config,
|
||||
FieldErrors,
|
||||
generateToken,
|
||||
User,
|
||||
} from "@fosscord/util";
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
const router = Router();
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { route } from "@fosscord/api";
|
||||
import { Email, User } from "@fosscord/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { Email, User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
const router = Router();
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { FieldErrors, User, BackupCodesChallengeSchema } from "@fosscord/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { FieldErrors, User, BackupCodesChallengeSchema } from "@spacebar/util";
|
||||
import bcrypt from "bcrypt";
|
||||
const router = Router();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user