[mastodon-client] Fix handling of long redirect URIs in the oauth_token table

This commit is contained in:
Laura Hausmann 2023-10-14 14:35:31 +02:00
parent 2c0a006af6
commit c7e0659cfb
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class IncreaseOauthTokenRedirecturisLength1697286869039 implements MigrationInterface {
name = 'IncreaseOauthTokenRedirecturisLength1697286869039'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "oauth_token" ALTER "redirectUri" TYPE character varying(512)`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "oauth_token" ALTER "redirectUri" TYPE character varying(64)`);
}
}

View File

@ -58,7 +58,7 @@ export class OAuthToken {
public scopes: string[];
@Column("varchar", {
length: 64,
length: 512,
comment: "The redirect URI of the OAuth token",
})
public redirectUri: string;