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

Use the latest Cosmiframe version with security features #154

Merged
merged 2 commits into from
May 8, 2024

Conversation

NoahSaso
Copy link
Contributor

@NoahSaso NoahSaso commented May 8, 2024

Description

Cosmiframe previously lacked origin restrictions that meant any parent window could control the app, potentially allowing for MITM attacks.

This updates it to the latest version which requires strict origin filters.

Since Graz does not currently provide any way for clients to specify custom options for a given wallet adapter, I just changed the Cosmiframe wallet to a DAO DAO-specific wallet which only works on trusted DAO DAO domains. This can be extended later if other parent apps want to integrate with Graz.

useGrazInternalStore.getState()._notFoundFn();
throw new Error("not in iframe");
}

const keplr = new Cosmiframe().getKeplrClient();
const keplr = new Cosmiframe(["https://daodao.zone", "https://dao.daodao.zone"]).getKeplrClient();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we expose this options in GrazProvider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh sure that'd be great

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@NoahSaso NoahSaso force-pushed the noah/upgrade-cosmiframe branch 3 times, most recently from e91adb6 to 59c9b15 Compare May 8, 2024 15:10
Copy link
Member

@codingki codingki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codingki codingki merged commit c461aaa into graz-sh:dev May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants