Skip to content

pre-populate cert-search form with a GET param #108

Open

Description

@jvanasco

I am leveraging links to LetsDebug in my client, and hoping to pre-populate the forms, so users can just hit "submit" once the page loads.

This works as I had hoped:

https://letsdebug.net/?domain=GET.example.com

This does not, and it would be nice if it could!

https://tools.letsdebug.net/cert-search?domain=GET.example.com

Activity

  1. GermanCoding commented on Feb 16, 2025

    @GermanCoding
    Contributor

    The search tool names its parameters differently (I think because it also supports raw SQL queries):

    https://tools.letsdebug.net/cert-search?m=domain&q=<domain>&d=<in the last n hours>

    However, it also directly starts the search (not only pre-populating the form) right away, not sure if that's what you're looking for.

    The search tool unfortunately currently suffers from crt.sh slowness, causing lots of failed searches (error messages from crt.sh's load balancer, plain timeouts...). It does usually work if you hit retry enough times, but it isn't exactly great UX. I had hoped that crt.sh's recent database migration (they moved to a different DC) would help with the load, but the SQL-based search still appears wonky.

  2. jvanasco commented on Feb 16, 2025

    @jvanasco
    Author

    However, it also directly starts the search (not only pre-populating the form) right away, not sure if that's what you're looking for.

    Interesting. Usually forms are guarded to only process on POST.

    I'll just link to the page without a querystring arg, and let users decide to continue or not.

  3. GermanCoding commented on Feb 16, 2025

    @GermanCoding
    Contributor

    Interesting. Usually forms are guarded to only process on POST.

    That's because this is not a form per se, but a Vue.js SPA. The entire form is processed client-side, there's no traditional POST'ing going on. The client SPA forms an SQL query and then uses a proxy provided by Let's Debug (as browsers can't really do PGSQL connections by themselves) to talk to crt.sh.

    There's always a security consideration to these things, like CSRF and friends. This isn't really a concern for this use case though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions