Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated .env to have new NFT address. #321

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

Freshenext
Copy link
Contributor

Updated CommunitiesSection.tsx to properly display the NFTs. Updated [address].tsx to have better error handling when nftInfo is not set.

Updated CommunitiesSection.tsx to properly display the NFTs.
Updated [address].tsx to have better error handling when nftInfo is not set.
@Freshenext Freshenext requested a review from shenshin October 30, 2024 00:07
@Freshenext Freshenext self-assigned this Oct 30, 2024
@@ -60,7 +60,9 @@
const { stRifBalance } = useStRif()

const nftInfo = communitiesMapByContract[nftAddress || '']

if (nftInfo === undefined) {
console.warn(`The current NFT address is not registered: ${nftAddress} - Please check the config.`)

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.

Copilot Autofix AI 2 months ago

To fix the log injection issue, we need to sanitize the nftAddress before logging it. Specifically, we should remove any newline characters from the nftAddress to prevent log injection. This can be done using String.prototype.replace to remove newline characters.

Suggested changeset 1
src/pages/communities/nft/[address].tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/pages/communities/nft/[address].tsx b/src/pages/communities/nft/[address].tsx
--- a/src/pages/communities/nft/[address].tsx
+++ b/src/pages/communities/nft/[address].tsx
@@ -63,3 +63,4 @@
   if (nftInfo === undefined) {
-    console.warn(`The current NFT address is not registered: ${nftAddress} - Please check the config.`)
+    const sanitizedNftAddress = nftAddress?.replace(/\n|\r/g, "")
+    console.warn(`The current NFT address is not registered: ${sanitizedNftAddress} - Please check the config.`)
   }
EOF
@@ -63,3 +63,4 @@
if (nftInfo === undefined) {
console.warn(`The current NFT address is not registered: ${nftAddress} - Please check the config.`)
const sanitizedNftAddress = nftAddress?.replace(/\n|\r/g, "")
console.warn(`The current NFT address is not registered: ${sanitizedNftAddress} - Please check the config.`)
}
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@shenshin shenshin merged commit a83efbc into develop Oct 30, 2024
5 checks passed
@rodrigoncalves rodrigoncalves deleted the OG_FOUNDERS_ADDR_UPDATE branch November 6, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants