Handle l param missing for WKD request
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
class WebKeyDirectoryController < WellKnownController
|
||||
before_action :allow_cross_origin_requests
|
||||
|
||||
# /.well-known/openpgpkey/hu/:hashed_username(.txt)
|
||||
# /.well-known/openpgpkey/hu/:hashed_username(.txt)?l=username
|
||||
def show
|
||||
@user = User.find_by(cn: params[:l].downcase)
|
||||
username = params[:l] || ""
|
||||
@user = User.find_by(cn: username.downcase)
|
||||
|
||||
if @user.nil? ||
|
||||
@user.pgp_pubkey.blank? ||
|
||||
|
||||
Reference in New Issue
Block a user