katalyst-koi 5.11.5 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afee7b805fac88ecb5a44d5c133496622e254163996ff365dfd25a80c61bf280
|
|
4
|
+
data.tar.gz: 23245c78eba9d5cf35c489811939c290c54ad0e3ec3adca50fb99cac612f394b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 474bfc88b55a6666838dfe870359e3c647d099120b48673e17242666ea30f60a0a82d25ec02e7277cf220be45b1f250a8bd8a1f02e86580e8b9042e8b7a74503
|
|
7
|
+
data.tar.gz: bda368a27d974f89bfa75371643c74a2bbf424202fc6304a1f1fee7b61173a574e1134b19eb8e9269259691d6cec46db06f3c47a58f6317be7c3a0d8f207c3e5
|
|
@@ -49,8 +49,11 @@ module Koi
|
|
|
49
49
|
def webauthn_authenticate!(response)
|
|
50
50
|
return if response.blank?
|
|
51
51
|
|
|
52
|
+
credential = JSON.parse(response)
|
|
53
|
+
return false unless credential.is_a?(Hash)
|
|
54
|
+
|
|
52
55
|
webauthn_credential, stored_credential = webauthn_relying_party.verify_authentication(
|
|
53
|
-
|
|
56
|
+
credential,
|
|
54
57
|
session.delete(:authentication_challenge),
|
|
55
58
|
) do |credential|
|
|
56
59
|
Admin::Credential.find_by!(external_id: credential.id)
|
|
@@ -62,7 +65,7 @@ module Koi
|
|
|
62
65
|
)
|
|
63
66
|
|
|
64
67
|
stored_credential.admin
|
|
65
|
-
rescue ActiveRecord::RecordNotFound, WebAuthn::VerificationError
|
|
68
|
+
rescue ActiveRecord::RecordNotFound, WebAuthn::VerificationError, JSON::ParserError
|
|
66
69
|
false
|
|
67
70
|
end
|
|
68
71
|
|
|
@@ -75,8 +75,8 @@ module Koi
|
|
|
75
75
|
# @param model [ActiveRecord::Base] The record to create an archive/delete link for
|
|
76
76
|
# @param archive_text [String] Text to display for archive link (default: "Archive")
|
|
77
77
|
# @param delete_text [String] Text to display for delete link (default: "Delete")
|
|
78
|
-
# @param confirm [String] Confirmation message for delete
|
|
79
|
-
# @param url [String] Target url for delete actions (defaults to admin_<record>_path)
|
|
78
|
+
# @param confirm [String] Confirmation message for archive and delete actions (default: "Are you sure?")
|
|
79
|
+
# @param url [String] Target url for archive and delete actions (defaults to admin_<record>_path)
|
|
80
80
|
# @param ** Additional HTML attributes to pass to the link
|
|
81
81
|
# @return [String, nil] Returns the HTML link element, or nil if record is not persisted
|
|
82
82
|
#
|
|
@@ -97,7 +97,7 @@ module Koi
|
|
|
97
97
|
if model.archived?
|
|
98
98
|
link_to(delete_text, url, data: { turbo_method: :delete, turbo_confirm: confirm }, **)
|
|
99
99
|
else
|
|
100
|
-
link_to(archive_text, url, data: { turbo_method: :delete }, **)
|
|
100
|
+
link_to(archive_text, url, data: { turbo_method: :delete, turbo_confirm: confirm }, **)
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
103
|
|