Skip to content

Conversation

simonLeary42
Copy link
Collaborator

@simonLeary42 simonLeary42 commented Apr 19, 2025

#179 added failing tests, this PR makes those tests pass. Also used UnitySite for ajax ssh key validation rather than using phpseclib directly in both places. Also added a simple test for ajax ssh key validation.

I had to remove the autoload.php from this file since it tries to open external connections. I think that's fine since this file is so trivial, but would like a second opinion. Along with the external connections it also sets up $SSO, $USER, $OPERATOR, $_SESSION keys SSO is_admin user_exists is_pi

@simonLeary42 simonLeary42 force-pushed the catch-ssh-key-edge-cases branch from a99ea4f to d2608ca Compare April 20, 2025 00:33
@simonLeary42 simonLeary42 merged commit 6201b37 into main Apr 20, 2025
3 checks passed
simonLeary42 added a commit that referenced this pull request Apr 30, 2025
* improve ssh key validation

* catch all throwables

* trim should be done externally

* phpunit expect warning

* put back checks to please phpunit

* add comments, try out removing digits check

* remove digits check

* remove use
@simonLeary42 simonLeary42 deleted the catch-ssh-key-edge-cases branch June 6, 2025 18:50
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.

1 participant