Booking path 1 (offer + guest acceptance), 2FA for all, privacy hardening, brand graphics in theme
- Offer workflow: "Angebot senden" in the admin (dates, guests, promo code, manual price adjustment, validity from the property's hold time, message, guest data for the contract) with live price; contract draft PDF; signed, versioned offer page for the guest to accept (acceptance record without IP) or decline; expiry job, landlord notifications, editable offer texts, wording on the website. - 2FA is mandatory for every admin account. - Privacy: complete anonymisation (notes, attribution, review names, offer messages), shorter periods for unbinding requests, portal mail excerpts and attribution (configurable proposals), iCal summary not stored, known e-mail no longer overwrites guest data, security headers, bearer tokens for automations, metadata stripped from photo originals, review link throttled. - Daily database backup (backup:database) and scripts/backup-pull.sh for the NAS. - Theme: brand mark in header/footer, favicon/touch icon, wave divider, icons, illustration as image placeholder; navy follows the text colour for dark appearances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
82698f8eda
commit
4f69b426a4
77 files changed
+1658
-108
No files matched your search
@@ -36,8 +36,7 @@ public function feed(string $token, ICalFeed $feed): Response
|
||||
|
||||
public function health(Request $request): JsonResponse
|
||||
{
|
||||
$token = config('fewo.channels.health_token');
|
||||
abort_if(blank($token) || ! hash_equals($token, (string) $request->query('token')), 404);
|
||||
abort_unless($this->hasValidToken($request, config('fewo.channels.health_token')), 404);
|
||||
|
||||
$channels = Channel::query()->active()->get()->map(fn (Channel $channel): array => [
|
||||
'name' => $channel->name,
|
||||
@@ -69,8 +68,7 @@ public function health(Request $request): JsonResponse
|
||||
*/
|
||||
public function scheduler(Request $request): JsonResponse
|
||||
{
|
||||
$token = config('fewo.scheduler_token');
|
||||
abort_if(blank($token) || ! hash_equals($token, (string) $request->query('token')), 404);
|
||||
abort_unless($this->hasValidToken($request, config('fewo.scheduler_token')), 404);
|
||||
|
||||
Artisan::call('schedule:run');
|
||||
|
||||
@@ -129,4 +127,15 @@ private function verifySignature(Request $request): void
|
||||
|
||||
abort_if(blank($secret) || ! hash_equals(hash_hmac('sha256', $request->getContent(), $secret), $signature), 403);
|
||||
}
|
||||
|
||||
/**
|
||||
* The token is sent as header "Authorization: Bearer <token>" (preferred – does not end up in web server logs)
|
||||
* or, for older automations, as ?token=<token>.
|
||||
*/
|
||||
private function hasValidToken(Request $request, ?string $expected): bool
|
||||
{
|
||||
$given = (string) ($request->bearerToken() ?? $request->header('X-Fewo-Token') ?? $request->query('token', ''));
|
||||
|
||||
return filled($expected) && hash_equals((string) $expected, $given);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user