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

[bug] Deleting a VPN Client certificate raises 500 error #611

Closed
pandafy opened this issue Feb 23, 2022 · 4 comments · Fixed by #646
Closed

[bug] Deleting a VPN Client certificate raises 500 error #611

pandafy opened this issue Feb 23, 2022 · 4 comments · Fixed by #646
Labels
bug Good first issue Easy issue that new contributors may like to pick up to get themselves familiar with the repository.

Comments

@pandafy
Copy link
Member

pandafy commented Feb 23, 2022

Steps to replicate

  1. Create a VPN server with OpenVPN backend
  2. Create a template for the VPN server created in step 1
  3. Create a device and apply the template created in step 2 to this device
  4. Go to /admin/pki/cert/ and delete the certificate related to the device

Expected Outcome
The certificate is deleted and along with it VpnClient object is also deleted.

Actual Outcome
Server 500 Error

Possible fix:
Wrap the following code in a try except block.

if instance.cert:
instance.cert.delete()

We need a dedicated test for this regression.

@pandafy pandafy added the Good first issue Easy issue that new contributors may like to pick up to get themselves familiar with the repository. label Feb 23, 2022
@pandafy pandafy added this to Backlog in OpenWISP Priorities for next releases via automation Feb 23, 2022
@nemesifier nemesifier moved this from Backlog to To do in OpenWISP Priorities for next releases Feb 23, 2022
@nemesifier nemesifier added the bug label Feb 23, 2022
@Subhraneel77
Copy link

Can I Give it a Try?

Subhraneel77 pushed a commit to Subhraneel77/openwisp-controller that referenced this issue Feb 27, 2022
@pandafy
Copy link
Member Author

pandafy commented Mar 1, 2022

Sure! Go ahead @Subhraneel77

@nemesifier nemesifier moved this from To do to In progress in OpenWISP Priorities for next releases Apr 20, 2022
@nemesifier nemesifier moved this from In progress to To do in OpenWISP Priorities for next releases Apr 20, 2022
@Aryamanz29
Copy link
Member

I'd like to work on this.

@nemesifier
Copy link
Member

@Aryamanz29 👍 👍

Aryamanz29 added a commit to Aryamanz29/openwisp-controller that referenced this issue May 7, 2022
- Deletion of VPN Client certificate raises 'ObjectDoesNotExist' exception.
- Wrapped post_delete signal in a try-except block.

Closes openwisp#611
Aryamanz29 added a commit to Aryamanz29/openwisp-controller that referenced this issue May 7, 2022
- Deletion of VPN Client certificate raises 'ObjectDoesNotExist' exception.
- Wrapped post_delete signal in a try-except block.

Closes openwisp#611
OpenWISP Priorities for next releases automation moved this from To do to Done May 9, 2022
nemesifier pushed a commit that referenced this issue May 9, 2022
- Deletion of VPN Client certificate raises 'ObjectDoesNotExist' exception.
- Wrapped post_delete signal in a try-except block.

Closes #611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Good first issue Easy issue that new contributors may like to pick up to get themselves familiar with the repository.
Development

Successfully merging a pull request may close this issue.

4 participants