disarm 0.12.0-x86_64-linux → 0.13.0-x86_64-linux
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 +4 -4
- data/lib/disarm/3.1/disarm.so +0 -0
- data/lib/disarm/3.2/disarm.so +0 -0
- data/lib/disarm/3.3/disarm.so +0 -0
- data/lib/disarm/version.rb +1 -1
- data/lib/disarm.rb +27 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d81c4bbe604fd099bba7266d2921248be9972a688da6a5b15b355f582a69f058
|
|
4
|
+
data.tar.gz: 0ec9829b26b563078dfac28f4b13989055d85ba80fcf985b917627c983ed1ed5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 466a9a07bf889ecd2d17acdb319bd306f52bbad97bc1ba09dd99243c6c9450bac2a54c651022a2c0c0ca0da388933d5442cf8fbd25328f0e9a457642d80e5f39
|
|
7
|
+
data.tar.gz: 87ec554bed96f2dcc23d8642a20e41a7e88d8f772a3410a3751c1056ed3978bfd25c07025070ca3e49803ca4cc55a567195dde8a0f7efb176b172e5cf3ee646a
|
data/lib/disarm/3.1/disarm.so
CHANGED
|
Binary file
|
data/lib/disarm/3.2/disarm.so
CHANGED
|
Binary file
|
data/lib/disarm/3.3/disarm.so
CHANGED
|
Binary file
|
data/lib/disarm/version.rb
CHANGED
data/lib/disarm.rb
CHANGED
|
@@ -159,6 +159,33 @@ module Disarm
|
|
|
159
159
|
translate_errors { _suspicious_hostname?(host) }
|
|
160
160
|
end
|
|
161
161
|
|
|
162
|
+
# The full hostname homoglyph analysis (#549) behind #suspicious_hostname?,
|
|
163
|
+
# as a Hash. `:suspicious` is a maximally conservative screen (an any-character
|
|
164
|
+
# confusable test flags essentially every non-Latin host), not a precise verdict;
|
|
165
|
+
# branch on the granular signals plus your own policy. Keys: :suspicious,
|
|
166
|
+
# :scripts, :mixed_script, :has_confusables, :bidi_conflict, :cross_label_script,
|
|
167
|
+
# :label_scripts, :whole_script_confusable, :label_whole_script_confusable,
|
|
168
|
+
# :canonical. `:whole_script_confusable` is a graded signal, NOT folded into
|
|
169
|
+
# `:suspicious` (see #545).
|
|
170
|
+
def analyze_hostname(host)
|
|
171
|
+
suspicious, scripts, mixed_script, has_confusables, bidi_conflict,
|
|
172
|
+
cross_label_script, label_scripts, whole_script_confusable,
|
|
173
|
+
label_whole_script_confusable, canonical =
|
|
174
|
+
translate_errors { _analyze_hostname(host) }
|
|
175
|
+
{
|
|
176
|
+
suspicious:,
|
|
177
|
+
scripts:,
|
|
178
|
+
mixed_script:,
|
|
179
|
+
has_confusables:,
|
|
180
|
+
bidi_conflict:,
|
|
181
|
+
cross_label_script:,
|
|
182
|
+
label_scripts:,
|
|
183
|
+
whole_script_confusable:,
|
|
184
|
+
label_whole_script_confusable:,
|
|
185
|
+
canonical:,
|
|
186
|
+
}
|
|
187
|
+
end
|
|
188
|
+
|
|
162
189
|
# Apply a Unicode normalization form. `form:` is :nfc (default), :nfd,
|
|
163
190
|
# :nfkc, or :nfkd (a Symbol or String; case-insensitive).
|
|
164
191
|
def normalize(text, form: :nfc)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: disarm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.13.0
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Quinn
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|