All the available on-chain validator programs that limit certain redeemer actions to transactions containing an NFT use
hasToken :: TxOut -> Bool
hasToken txOut = assetClassValueOf (txOutValue txOut) (AssetClass{unAssetClass = ("something", TokenName "somename")}) == 1
Including Plutus Pioneer week 6
Is there anything preventing a malicious user from minting a token with a currency symbol "something" and TokenName "somename" and then just performing the transaction? (edited)
How can on-chain validators make sure that the redeemer action can only be completed by a transaction containing a Cardano Native Token or NFT with the given CurrencySymbol, TokenName AND PolicyId so that we can make sure that the asset was not minted by a malicious party.