2024-12-22_16-33-15Z_Sunday
This commit is contained in:
parent
95fc593bf9
commit
0aeaa8f66d
@ -4,7 +4,7 @@ This process involves requesting a slot and verifying that the request is valid.
|
|||||||
|
|
||||||
[`calendar.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/calendar.php) → [`request.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/request.php) → [`request_confirm.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/request_confirm.php) → `email` → [`upload.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload.php) → [`upload_confirm.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload_confirm.php) → `email`
|
[`calendar.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/calendar.php) → [`request.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/request.php) → [`request_confirm.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/request_confirm.php) → `email` → [`upload.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload.php) → [`upload_confirm.php`](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload_confirm.php) → `email`
|
||||||
|
|
||||||
## Summary
|
# Summary
|
||||||
|
|
||||||
- The host has their show recorded and wishes to select a slot.
|
- The host has their show recorded and wishes to select a slot.
|
||||||
- They go to https://hackerpublicradio.org/ and select the [⇧Upload⇧](https://hub.hackerpublicradio.org/calendar.php), which executes [calendar.php](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/calendar.php).
|
- They go to https://hackerpublicradio.org/ and select the [⇧Upload⇧](https://hub.hackerpublicradio.org/calendar.php), which executes [calendar.php](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/calendar.php).
|
||||||
@ -14,9 +14,11 @@ This process involves requesting a slot and verifying that the request is valid.
|
|||||||
- The host fills in the form which executes [upload_confirm.php](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload_confirm.php).
|
- The host fills in the form which executes [upload_confirm.php](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/hub/upload_confirm.php).
|
||||||
- The host receives a confirmation email.
|
- The host receives a confirmation email.
|
||||||
|
|
||||||
## Sequence Diagram Requesting a slot
|
# Sequence Diagram Requesting a slot
|
||||||
|
|
||||||
### Picking a slot
|
## Picking a slot
|
||||||
|
|
||||||
|
The Host wishes to upload a show and wants to pick a date.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
@ -26,35 +28,43 @@ sequenceDiagram
|
|||||||
HPR->>HPR: Remove any requests from this IP older than 15min
|
HPR->>HPR: Remove any requests from this IP older than 15min
|
||||||
HPR->>Host: Display Calendar page
|
HPR->>Host: Display Calendar page
|
||||||
```
|
```
|
||||||
### Reserving the slot
|
The website provides a Calendar with a list of available slots.
|
||||||
|
|
||||||
|
![The Calendar page](calendar.png)
|
||||||
|
|
||||||
|
|
||||||
|
## Requesting a slot
|
||||||
|
|
||||||
|
The Host picks a slot and wants to reserve it.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
Host->>HPR: Pick a free slot
|
Host->>HPR: Request a free slot
|
||||||
Note over HPR: request.php
|
Note over HPR: request.php
|
||||||
host->>HPR: Reserve Slot
|
HPR->>HPR: Remove unverified requests
|
||||||
HPR->>HPR: Check for existing upload from this IP
|
HPR->>HPR: Check for existing upload from this IP
|
||||||
alt Existing Upload found
|
alt Existing Upload found
|
||||||
HPR->>host: You already made a request for a show
|
HPR->>Host: You already made a request for a show
|
||||||
Note over host: 412 Precondition Failed
|
Note over Host: 412 Precondition Failed
|
||||||
end
|
end
|
||||||
HPR->>HPR: Create a temporary entry for this host
|
HPR->>HPR: Create a temporary entry for this Host
|
||||||
|
Note over HPR: Workflow state REQUEST_UNVERIFIED
|
||||||
HPR->>HPR: Check for excessive uploads
|
HPR->>HPR: Check for excessive uploads
|
||||||
alt Excessive uploads found
|
alt Excessive uploads found
|
||||||
HPR->>host: Uploads have temporarily been suspended
|
HPR->>Host: Uploads have temporarily been suspended
|
||||||
Note over host: 412 Precondition Failed
|
Note over Host: 412 Precondition Failed
|
||||||
end
|
end
|
||||||
HPR->>HPR: Populate the list of posted shows
|
HPR->>HPR: Populate the list of posted shows
|
||||||
HPR->>HPR: Validate provided ID
|
HPR->>HPR: Validate provided ID
|
||||||
alt Invalid ID found
|
alt Invalid ID found
|
||||||
HPR->>HPR: Log IP to naughty file.
|
HPR->>HPR: Log IP to naughty file.
|
||||||
HPR->>host: 412 Precondition Failed
|
HPR->>Host: 412 Precondition Failed
|
||||||
Note over host: 412 Precondition Failed
|
Note over Host: 412 Precondition Failed
|
||||||
end
|
end
|
||||||
HPR->>HPR: Generate webform of free slots
|
HPR->>HPR: Generate webform of free slots
|
||||||
HPR->>HPR: Populate the list of posted shows
|
HPR->>HPR: Populate the list of posted shows
|
||||||
HPR->>host: Webform
|
HPR->>Host: Webform
|
||||||
host->>HPR: show ID and email
|
Host->>HPR: show ID and email
|
||||||
loop Preform Checks
|
loop Preform Checks
|
||||||
alt If check fails
|
alt If check fails
|
||||||
HPR->>HPR: Log Error
|
HPR->>HPR: Log Error
|
||||||
@ -64,8 +74,10 @@ sequenceDiagram
|
|||||||
email-->>Host: email upload url
|
email-->>Host: email upload url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
HPR->>Host: Thank You page
|
||||||
```
|
```
|
||||||
## Checks in request.php and request_confirm.php
|
|
||||||
|
### Checks in request.php and request_confirm.php
|
||||||
|
|
||||||
| 412 Error Code | Check |
|
| 412 Error Code | Check |
|
||||||
| --- | ------ |
|
| --- | ------ |
|
||||||
@ -95,6 +107,11 @@ sequenceDiagram
|
|||||||
| 434cb53552ce1e2708e74a42f438028c | Problem mapping the date to the episode number |
|
| 434cb53552ce1e2708e74a42f438028c | Problem mapping the date to the episode number |
|
||||||
| c7405e79b54f582e8db46c69ec4b0f24 | Problem writing to the database |
|
| c7405e79b54f582e8db46c69ec4b0f24 | Problem writing to the database |
|
||||||
|
|
||||||
|
The website provides a "Thank You" page notifying the Host that the email is sent.
|
||||||
|
|
||||||
|
![The email confirmation page](request_slot_thank_you.png)
|
||||||
|
|
||||||
|
|
||||||
## Sequence Diagram uploading a show
|
## Sequence Diagram uploading a show
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
@ -121,7 +138,7 @@ sequenceDiagram
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
## Checks in upload.php
|
### Checks in upload.php
|
||||||
|
|
||||||
| 412 Error Code | Check |
|
| 412 Error Code | Check |
|
||||||
| --- | ------ |
|
| --- | ------ |
|
||||||
@ -133,7 +150,7 @@ end
|
|||||||
| 066c518314f0d3b1ad3e4af60fcf36ce | Unable to remove temporary lock |
|
| 066c518314f0d3b1ad3e4af60fcf36ce | Unable to remove temporary lock |
|
||||||
| 5cb513b590ab5859bf7603b79402a5cb | Could not find Host in Database |
|
| 5cb513b590ab5859bf7603b79402a5cb | Could not find Host in Database |
|
||||||
|
|
||||||
## Checks in upload_confirm.php
|
### Checks in upload_confirm.php
|
||||||
|
|
||||||
| 412 Error Code | Check |
|
| 412 Error Code | Check |
|
||||||
| --- | ------ |
|
| --- | ------ |
|
||||||
|
Loading…
Reference in New Issue
Block a user