This commit is contained in:
Tom Moor committed 2025-04-05 23:12:14 -04:00
1 parent 9e7dd5b4f7
commit f71afc2bf5
4 files changed
+6 -11

No files matched your search

@@ -106,10 +106,11 @@ export const OAuthClientForm = observer(function OAuthClientForm_({
placeholder="https://example.com/callback"
ref={field.ref}
value={field.value.join("\n")}
rows={Math.max(2, field.value.length)}
rows={Math.max(2, field.value.length + 1)}
onChange={(event) => {
field.onChange(event.target.value.split("\n"));
}}
required
/>
)}
/>
+3 -1
View File
@@ -173,6 +173,7 @@ const Application = observer(function Application({ oauthClient }: Props) {
<Input
type="text"
{...register("description", {
required: true,
maxLength: OAuthClientValidation.maxDescriptionLength,
})}
flex
@@ -276,10 +277,11 @@ const Application = observer(function Application({ oauthClient }: Props) {
placeholder="https://example.com/callback"
ref={field.ref}
value={field.value.join("\n")}
rows={Math.max(2, field.value.length)}
rows={Math.max(2, field.value.length + 1)}
onChange={(event) => {
field.onChange(event.target.value.split("\n"));
}}
required
/>
)}
/>
@@ -21,14 +21,6 @@ describe("OAuthInterface", () => {
);
expect(result).toBe(true);
});
it("should return false for insecure redirect URI", async () => {
const redirectUri = "http://example.com/callback";
const result = await OAuthInterface.validateRedirectUri(
redirectUri,
client
);
expect(result).toBe(false);
});
it("should return false for invalid redirect URI", async () => {
const redirectUri = "invalid_uri";
const result = await OAuthInterface.validateRedirectUri(
+1 -1
View File
@@ -220,7 +220,7 @@ export const OAuthInterface: RefreshTokenModel &
return false;
}
return !uri.startsWith("http://");
return true;
},
/**