Fix 500 when pubkey is nil

This commit is contained in:
Râu Cao 2025-01-02 08:30:58 -05:00
parent 8aa3ca9e23
commit 7df56479a4
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -6,7 +6,7 @@ class WebKeyDirectoryController < WellKnownController
@user = User.find_by(cn: params[:l].downcase) @user = User.find_by(cn: params[:l].downcase)
if @user.nil? || if @user.nil? ||
@user.pgp_pubkey.empty? || @user.pgp_pubkey.blank? ||
!@user.pgp_pubkey_contains_user_address? !@user.pgp_pubkey_contains_user_address?
http_status :not_found and return http_status :not_found and return
end end