Comment for regex

This commit is contained in:
x032205
2025-05-15 11:41:00 -04:00
parent 1e11702c58
commit e1f3eaf1a0

View File

@@ -58,7 +58,7 @@ export const identityOciAuthServiceFactory = ({
const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ identityId: identityOciAuth.identityId }); const identityMembershipOrg = await identityOrgMembershipDAL.findOne({ identityId: identityOciAuth.identityId });
// Validate OCI host format // Validate OCI host format. Ensures that the host is in "identity.<region>.oraclecloud.com" format.
if (!headers.host || !new RE2("^identity\\.([a-z]{2}-[a-z]+-[1-9])\\.oraclecloud\\.com$").test(headers.host)) { if (!headers.host || !new RE2("^identity\\.([a-z]{2}-[a-z]+-[1-9])\\.oraclecloud\\.com$").test(headers.host)) {
throw new BadRequestError({ throw new BadRequestError({
message: "Invalid OCI host format. Expected format: identity.<region>.oraclecloud.com" message: "Invalid OCI host format. Expected format: identity.<region>.oraclecloud.com"