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

Clean up WebAuthn javascript code and remove JQuery code #22697

Merged
merged 34 commits into from
Jun 6, 2023

Commits on Jan 29, 2023

  1. Fix Uncaught DOMException: Failed to execute 'atob' on 'Window'

    There is a missing import within the `uint8-to-base64` javascript
    package which assumes that `atob` and `btoa` are present and exported
    instead of using the `window.atob` and `window.btoa` functions. This
    previously worked but as far as I can see things have become more strict
    and this no longer works.
    
    The dependency is small and I do not believe that we gain much from
    having this code as an external dependency. I think instead we should
    just consume this dependency and bring the code directly into Gitea
    itself - the code is itself just some standard incantation for creating
    base64 arrays in javascript.
    
    Therefore this PR simply removes the dependency on `uint8-to-base64` and
    rewrites the functions used in it.
    
    Fix go-gitea#22507
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    df2adb2 View commit details
    Browse the repository at this point in the history
  2. Update web_src/js/features/user-auth-webauthn.js

    Co-authored-by: delvh <dev.lh@web.de>
    zeripath and delvh authored Jan 29, 2023
    Configuration menu
    Copy the full SHA
    f40e516 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    07e40bd View commit details
    Browse the repository at this point in the history
  4. Include findings from go-gitea#22654

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    dcd6307 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4a910b9 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. As per wxiaoguang

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    f038244 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6326456 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    7864ed8 View commit details
    Browse the repository at this point in the history
  2. fix test

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    b37e6a1 View commit details
    Browse the repository at this point in the history
  3. Clean up WebAuthn javascript code and remove JQuery code

    There were several issues with the WebAuthn registration and testing code and the style
    was very old javascript with jquery callbacks.
    
    This PR uses async and fetch to replace the JQuery code.
    
    Ref go-gitea#22651
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    104a864 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. Configuration menu
    Copy the full SHA
    7acd2a3 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. as per silverwind

    Co-authored-by: silverwind <me@silverwind.io>
    zeripath and silverwind authored Feb 2, 2023
    Configuration menu
    Copy the full SHA
    834c30f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dbfdea9 View commit details
    Browse the repository at this point in the history
  3. fix-broken-suggestion

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    983c6d3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0414113 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Configuration menu
    Copy the full SHA
    4ff437c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8c6827 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Configuration menu
    Copy the full SHA
    074173c View commit details
    Browse the repository at this point in the history
  2. as per reviews

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 10, 2023
    Configuration menu
    Copy the full SHA
    2961333 View commit details
    Browse the repository at this point in the history
  3. more reviews

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 10, 2023
    Configuration menu
    Copy the full SHA
    e402020 View commit details
    Browse the repository at this point in the history
  4. add more testcases

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 10, 2023
    Configuration menu
    Copy the full SHA
    c4fd5bb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    43c616e View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. Configuration menu
    Copy the full SHA
    1abde48 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2023

  1. Configuration menu
    Copy the full SHA
    f500353 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3026b5b View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    3f918f8 View commit details
    Browse the repository at this point in the history
  2. Update web_src/js/features/user-auth-webauthn.js

    Co-authored-by: delvh <dev.lh@web.de>
    silverwind and delvh authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    d412383 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90575a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    63e417e View commit details
    Browse the repository at this point in the history
  5. add message header colors

    silverwind committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    fd08d9e View commit details
    Browse the repository at this point in the history
  6. use showElem, hideElem

    silverwind committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    93ba232 View commit details
    Browse the repository at this point in the history
  7. reformat html

    silverwind committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    41dba0c View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. Configuration menu
    Copy the full SHA
    1ce6d71 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33de52e View commit details
    Browse the repository at this point in the history