landline 0.13.0 → 0.13.1
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/landline/probe.rb +0 -1
- data/lib/landline/server.rb +19 -1
- data/lib/landline.rb +1 -1
- metadata +25 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0030a186773f20d0e2df74154da3ccc492756c06213a3d53af3826becce6db55
|
|
4
|
+
data.tar.gz: 899e097df24132094b063203b7fc11ce3921f333b22a6804319aace6749b9ced
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a2dc1443d5c5be81f267d514de5188a9b2e36ce2d671899eb2d158b033c3f68343385123d38baf3bfcccdafbe6032e751b209a06f57dc61a4c04713319b87a5
|
|
7
|
+
data.tar.gz: fbd6c38e464e3e807a37f724dbd54181b91f14fd42330b5ea1e9ac79b5ed6dc540609fa3105b7e47738d4b9d2b6f28f443152daf2c8f26af307ee747f67936e3
|
data/lib/landline/probe.rb
CHANGED
data/lib/landline/server.rb
CHANGED
|
@@ -27,6 +27,9 @@ module Landline
|
|
|
27
27
|
def call(env)
|
|
28
28
|
request = Landline::Request.new(env)
|
|
29
29
|
|
|
30
|
+
failed_msg = check_unicode(request)
|
|
31
|
+
return failed_msg.finalize if failed_msg
|
|
32
|
+
|
|
30
33
|
response = handle_jumps(request)
|
|
31
34
|
request.run_postprocessors(response)
|
|
32
35
|
resp = response.finalize
|
|
@@ -54,6 +57,22 @@ module Landline
|
|
|
54
57
|
response
|
|
55
58
|
end
|
|
56
59
|
|
|
60
|
+
# Check that all important parameters are actually valid unicode
|
|
61
|
+
def check_unicode(request)
|
|
62
|
+
return false if request.path.valid_encoding? &&
|
|
63
|
+
request.query.query.valid_encoding? &&
|
|
64
|
+
request.server_name.valid_encoding?
|
|
65
|
+
|
|
66
|
+
response = Landline::Response.convert(
|
|
67
|
+
@properties["handle.default"].call(
|
|
68
|
+
400,
|
|
69
|
+
backtrace: ["Invalid unicode string"]
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
response.status = 400
|
|
73
|
+
response
|
|
74
|
+
end
|
|
75
|
+
|
|
57
76
|
# Inititalization block for property setup
|
|
58
77
|
def setup_properties(*_args, **_opts)
|
|
59
78
|
{
|
|
@@ -61,7 +80,6 @@ module Landline
|
|
|
61
80
|
"handle.default" => proc do |code, backtrace: nil, **_extra|
|
|
62
81
|
page = Landline::Util.default_error_page(code, backtrace)
|
|
63
82
|
headers = {
|
|
64
|
-
"content-length": page.bytesize,
|
|
65
83
|
"content-type": "text/html",
|
|
66
84
|
"x-cascade": true
|
|
67
85
|
}
|
data/lib/landline.rb
CHANGED
|
@@ -12,7 +12,7 @@ require_relative 'landline/app'
|
|
|
12
12
|
# Landline is a backend framework born as a by-product of experimentation
|
|
13
13
|
module Landline
|
|
14
14
|
# Landline version
|
|
15
|
-
VERSION = '0.13.
|
|
15
|
+
VERSION = '0.13.1 "EDM Death Machine" (pre-alpha)'
|
|
16
16
|
|
|
17
17
|
# Landline branding and version
|
|
18
18
|
VLINE = "Landline/#{Landline::VERSION} (Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\n".freeze
|
metadata
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: landline
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yessiest
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
11
|
+
date: 2025-07-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: base64
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 0.1.0
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '0'
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 0.1.0
|
|
13
33
|
description: |
|
|
14
34
|
Landline is a no-hard-dependencies HTTP routing DSL that was made entirely for fun.
|
|
15
35
|
It runs on any HTTP server that supports the Rack 3.0 protocol.
|
|
@@ -77,14 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
77
97
|
requirements:
|
|
78
98
|
- - ">="
|
|
79
99
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 3.0.
|
|
100
|
+
version: 3.0.0
|
|
81
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
102
|
requirements:
|
|
83
103
|
- - ">="
|
|
84
104
|
- !ruby/object:Gem::Version
|
|
85
105
|
version: '0'
|
|
86
106
|
requirements: []
|
|
87
|
-
rubygems_version: 3.5.
|
|
107
|
+
rubygems_version: 3.5.23
|
|
88
108
|
signing_key:
|
|
89
109
|
specification_version: 4
|
|
90
110
|
summary: Elegant HTTP DSL
|