Shopifex.ShopDomain (Shopifex v3.0.0)

Copy Markdown View Source

Validates the shop query param Shopify sends on every install/auth request against Shopify's own *.myshopify.com pattern.

The pattern is anchored at both ends so a crafted value like evil.example/x?.myshopify.com or attacker.myshopify.com.evil.example cannot pass — using an unanchored match to gate an external redirect is an open-redirect vector (the redirect host is attacker-controlled).

Summary

Functions

Returns true if shop_url is a well-formed *.myshopify.com domain.

Functions

valid?(shop_url)

@spec valid?(String.t()) :: boolean()

Returns true if shop_url is a well-formed *.myshopify.com domain.