fix: low-severity security findings L3, L4, L5 (closes #6) #8

Merged
sneak merged 7 commits from fix/low-severity-security into main 2026-02-27 23:19:09 +01:00
Showing only changes of commit 909543e943 - Show all commits

View File

@@ -192,6 +192,10 @@ async function lookupTokenInfo(contractAddress, rpcUrl) {
name = symbol; name = symbol;
} }
// Truncate to prevent storage of excessively long values from RPC
name = String(name).slice(0, 64);
symbol = String(symbol).slice(0, 12);
log.infof("Token resolved:", symbol, "decimals", Number(decimals)); log.infof("Token resolved:", symbol, "decimals", Number(decimals));
return { name, symbol, decimals: Number(decimals) }; return { name, symbol, decimals: Number(decimals) };
} }