feat(whatsapp): validar firma de Meta en el webhook y restaurar el menú del módulo

- POST /webhooks exige X-Hub-Signature-256 (HMAC-SHA256 del cuerpo crudo);
  falla cerrado si app_secret no está configurado
- nueva clave app_secret en whatsapp_system_config, editable desde Configuración Bot
- menú lateral de WhatsApp visible de nuevo (Correo/IMAP sigue en Chat/Bot)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-08-26 23:02:39 -05:00
co-authored by Claude Opus 5
parent 5e0c0367d9
commit e3ad0a423a
6 changed files with 133 additions and 3 deletions
@@ -42,6 +42,14 @@
class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-400 font-mono">
@error('webhook_verify_token') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">App Secret *</label>
<input wire:model="app_secret" type="text"
class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-green-400 font-mono">
<p class="text-xs text-gray-400 mt-1">Firma los webhooks entrantes. Sin este valor el webhook rechaza todo.</p>
@error('app_secret') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
</div>
</div>
{{-- Control del bot --}}