feat(security): enhance input validation and security measures across various routes
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m38s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m38s
This commit is contained in:
@@ -39,7 +39,17 @@ export default function FederatedRoomDetail() {
|
||||
}, [id]);
|
||||
|
||||
const handleJoin = () => {
|
||||
window.open(room.join_url, '_blank');
|
||||
// Validate URL scheme to prevent javascript: or other malicious URIs
|
||||
try {
|
||||
const url = new URL(room.join_url);
|
||||
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
||||
toast.error(t('federation.invalidJoinUrl'));
|
||||
return;
|
||||
}
|
||||
window.open(room.join_url, '_blank');
|
||||
} catch {
|
||||
toast.error(t('federation.invalidJoinUrl'));
|
||||
}
|
||||
};
|
||||
|
||||
const handleRemove = async () => {
|
||||
|
||||
Reference in New Issue
Block a user