Skip to content

Commit

Permalink
Added sanitization for shop banner image URL
Browse files Browse the repository at this point in the history
  • Loading branch information
calvadev committed Sep 4, 2024
1 parent 2ce8e65 commit 734dec1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/home/marketplace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import SignInModal from "../sign-in/SignInModal";
import ShopstrSwitch from "../utility-components/shopstr-switch";
import { ShopSettings } from "../../utils/types/types";
import SideShopNav from "./side-shop-nav";
import { sanitizeUrl } from "@braintree/sanitize-url";

export function MarketplacePage({
focusedPubkey,
Expand Down Expand Up @@ -121,7 +122,7 @@ export function MarketplacePage({
<>
<div className="flex h-auto w-full items-center justify-center bg-cover bg-center">
<img
src={shopBannerURL}
src={sanitizeUrl(shopBannerURL)}
alt="Shop Banner"
className="flex max-h-[310.5px] w-full items-center justify-center object-cover"
/>
Expand Down
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"knex:migrate": "node --loader ts-node/esm ./node_modules/.bin/knex --knexfile ./knexfile.ts migrate:latest"
},
"dependencies": {
"@braintree/sanitize-url": "^7.1.0",
"@cashu/cashu-ts": "^0.8.1",
"@getalby/lightning-tools": "^5.0.1",
"@heroicons/react": "^2.1.1",
Expand Down

0 comments on commit 734dec1

Please sign in to comment.