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

capa Explorer Web: improve url navigation #2425

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

fariss
Copy link
Collaborator

@fariss fariss commented Oct 1, 2024

closes #2419

This PR enhances the navigation in capa Explorer Web by making sure the links generated are shareable. Preview.

Previously: users browsing to /analysis were always redirected to the homepage /.

With this PR:

  • If a user accesses /analysis without an rdoc query parameter set in the URL, they are still redirected to the homepage.
  • If a user accesses /analysis with the rdoc query parameter set, capa Explorer Web loads from that URL instead of redirecting to homepage.

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

This commit enhances the navigation guard for the /analysis route to
provide a better user experience when loading data from a URL:

Previously: users browsing to /analysis were always redirected to
the homepage (/).

With this commit:
- If a user accesses /analysis without an rdoc parameter, they are still
  redirected to the homepage.
- If a user accesses /analysis with an rdoc parameter, the following
  occurs:
  The user is redirected to the homepage (/) and the rdoc parameter is
  preserved in the URL, capa Explorer Web then loads the rdoc from URL.
@fariss fariss requested review from mr-tz and williballenthin and removed request for mr-tz October 1, 2024 15:55
@fariss fariss marked this pull request as ready for review October 1, 2024 15:56
Copy link
Collaborator

@mr-tz mr-tz left a comment

Choose a reason for hiding this comment

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

looks good to me, thank you!

CHANGELOG.md Outdated Show resolved Hide resolved
@mr-tz
Copy link
Collaborator

mr-tz commented Oct 1, 2024

TODO @s-ff: VirusTotal links have a short lifespan before expiration, add a toast message mentioning this instead of just "HTTP error 400"

will you create a separate PR for this?

@fariss
Copy link
Collaborator Author

fariss commented Oct 1, 2024

TODO @s-ff: VirusTotal links have a short lifespan before expiration, add a toast message mentioning this instead of just "HTTP error 400"

will you create a separate PR for this?

Yeah, I just created #2427 for tracking

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@mr-tz mr-tz merged commit 16eae70 into mandiant:master Oct 1, 2024
3 checks passed
@mr-tz
Copy link
Collaborator

mr-tz commented Oct 1, 2024

Thanks @s-ff!

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.

explorer web: improve URL navigation
2 participants