1 request
Ken Fallon edited this page 2024-10-29 11:49:56 +01:00

Requesting a slot

This process involves requesting a slot and verifying that the request is valid.

Sequence Diagram

sequenceDiagram
  host->>HPR: Reserve Slot
  HPR->>HPR: Remove any old stale requests
  HPR->>HPR: Remove any requests from this IP older than 15min
  HPR->>HPR: Check for existing upload from this IP
  alt Existing Upload found
    HPR->>host: You already made a request for a show
    Note over host: 412 Precondition Failed 
  end
  HPR->>HPR: Create a temporary entry for this host
  HPR->>HPR: Check for excessive uploads
  alt Excessive uploads found
    HPR->>host: Uploads have temporarily been suspended
    Note over host: 412 Precondition Failed 
  end
  HPR->>HPR:  Populate the list of posted shows
  HPR->>HPR:  Validate provided ID
  alt Invalid ID found
    HPR->>HPR: Log IP to naughty file.
    HPR->>host: 412 Precondition Failed 
    Note over host: 412 Precondition Failed 
  end
  HPR->>HPR:  Generate webform of free slots
  HPR->>HPR:  Populate the list of posted shows
  HPR->>host: Webform
  host->>HPR: show ID and email
  loop Preform Checks
    alt If check fails
      HPR->>HPR: Log Error
      HPR->>host: 412 ${error_code}
    else All checks passed
      HPR-->>email: upload url
      email->>host: upload url
    end
  end

Checks in request_confirm.php

412 Error Code Check
5971624889258aefb44e5f7bf8dffbd4 We are under DDOS attack.
19e9019c9615f755aec834000892ee9e Wrong method used
9bb147a251e8db132dafa93d98f8487f Your hiding your IP Address
02de1aef3b9490a417c39170d8f06028 You did not use the web form
2162941738512bfdb1d21f288ee7cdb4 You skipped the request page
f0ad965f523b5c2ade071eb20d3618b5 A breach in the space time continuum
6570026fd11fc31ac0cada3e1dae4d0b There is too long a time entering the form
a32fbe5f0494eb7f34034b164739314d Wrong date
76eaa1a1556faeadfc14631c35b8590a Missing an email address
8c307efe37146015a35e2d928c2c0f69 Not a valid email
705f8e26e42a90b31075a110674b19ee Not a valid date
ad7f805c2f42be77122ec52f114fe318 Date failed format check
9424f7407b2fb83407760ad763286b53 Episode Number is wrong
59c7bff340d023773d987d71df545110 Invalid date
47d186ad8d5b21ec7d455477ea08b023 Episode already exists
7304801e8ce3b9096d28dbe1a0faa642 Episode number is outside allowable window
34c4259b45927da50ba5c49970f880a4 Episode date is outside allowable window
d0e113355b35f96945124d8e507759a0 Problem finding the date and episode number
434cb53552ce1e2708e74a42f438028c Problem mapping the date to the episode number
c7405e79b54f582e8db46c69ec4b0f24 Problem writing to the database