mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
7ffb213ce7
- XSS fix: Created SanitizeHtml.ts utility using DOMPurify (already in package.json but never used). Wrapped all 21 dangerouslySetInnerHTML calls in catalog views with SanitizeHtml() — only allows safe tags (b, i, u, br, span, div, p, a, strong, em, img) - Race condition fix: Added 10-second timeout fallbacks on purchase flags in CatalogPurchaseWidgetView and CatalogGiftView so the flag auto-resets even if the server never responds
17 lines
597 B
TypeScript
17 lines
597 B
TypeScript
import { FC } from 'react';
|
|
import { SanitizeHtml } from '../../../../../api';
|
|
import { CatalogLayoutProps } from './CatalogLayout.types';
|
|
|
|
export const CatalogLayoutInfoLoyaltyView: FC<CatalogLayoutProps> = props =>
|
|
{
|
|
const { page = null } = props;
|
|
|
|
return (
|
|
<div className="h-full nitro-catalog-layout-info-loyalty text-black flex flex-row">
|
|
<div className="overflow-auto h-full flex flex-col info-loyalty-content">
|
|
<div dangerouslySetInnerHTML={ { __html: SanitizeHtml(page.localization.getText(0)) } } />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|