Skip to content

Commit b61f840

Browse files
committed
Update rack permitted hosts to permit all
Permitting all hosts. For PID application this is a low-risk setting. 1. Host header poisoning: Low-Medium risk - Since you're directly looking up PIDs in your database before redirecting, manipulated host headers won't affect your core redirection logic 2. Session hijacking: Low risk - Your PID resolution service likely doesn't rely on complex session states for anonymous users 3. Response header poisoning: Low risk - Without validation, response headers might include incorrect domains, but impact is minimal for redirections 4. Cache poisoning: Very low risk - With no CDN and direct AWS ELB routing, cache poisoning vectors are minimal
1 parent 2e69daf commit b61f840

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class PidApp < Sinatra::Base
6868
configure :development, :production do
6969
enable :logging
7070

71-
PERMITTED_HOSTNAMES = [APP_CONFIG['app_host']] + (APP_CONFIG['alt_app_hosts'] || "").split(',').map(&:strip)
71+
PERMITTED_HOSTNAMES = [] # allow all hosts
7272
set :host_authorization, { permitted_hosts: PERMITTED_HOSTNAMES }
7373
end
7474

app/config/app.yml.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ application_name: 'PID Service'
55
# The server and port where the main PID application will be hosted (comment out the port if you do not need to specify)
66
app_host: <%= ENV['APP_HOST'] %>
77
app_port: <%= ENV['APP_PORT'] %>
8-
alt_app_hosts: <%= ENV['ALT_APP_HOSTS'] %>
98

109
# The url that the system should direct users to when an inactive PID is requested
1110
dead_pid_url: <%= ENV['DEAD_PID_URL'] %>

0 commit comments

Comments
 (0)