Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ts/features/lollipop/utils/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const lollipopSamlVerify = (
const decodedSamlRequest = decodeURIComponent(urlEncodedSamlRequest);
// Result is a base64 encoded string, so decode it to obtain the (server) original XML
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'rquest' to 'request' in the PR title.

Copilot uses AI. Check for mistakes.
const xmlSamlRequest = pako.inflateRaw(
Buffer.from(decodedSamlRequest, "base64"),
Uint8Array.from(Buffer.from(decodedSamlRequest, "base64")),
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversion Uint8Array.from(Buffer.from(...)) creates an unnecessary intermediate Buffer object. Since Buffer in Node.js is already a subclass of Uint8Array, you can directly pass the Buffer to pako.inflateRaw. If compatibility issues exist, consider using new Uint8Array(Buffer.from(decodedSamlRequest, "base64")) instead, which is more efficient as it creates a view over the same memory rather than copying the data.

Suggested change
Uint8Array.from(Buffer.from(decodedSamlRequest, "base64")),
new Uint8Array(Buffer.from(decodedSamlRequest, "base64")),

Copilot uses AI. Check for mistakes.
{
to: "string"
}
Expand Down
Loading