Browse Source

Add backdoor script to manually hack postgresql database, fixes #187 (#188)

Kukks-patch-1
wiz 5 years ago
committed by Nicolas Dorier
parent
commit
bc054b9bd7
  1. 21
      btcpay-admin.sh

21
btcpay-admin.sh

@ -0,0 +1,21 @@
#!/bin/bash
query()
{
docker exec $(docker ps -a -q -f "name=postgres_1") psql -U postgres -d btcpayservermainnet -c "$*"
}
case "$1" in
reset-u2f)
query "SELECT * FROM \"U2FDevices\""
query "UPDATE public.\"AspNetUsers\" SET \"TwoFactorEnabled\"=false WHERE upper('\$1') = \"NormalizedEmail\""
query "SELECT * FROM \"U2FDevices\""
;;
*)
echo "Usage: $0 [command]"
echo
echo "Commands:"
echo " reset-u2f"
echo " reset-u2f"
esac
exit 0
Loading…
Cancel
Save