chore: clean publish artifacts and add sources

This commit is contained in:
2025-12-09 16:53:34 -06:00
parent 6138c0a60c
commit 673fa06d1e
62 changed files with 9137 additions and 0 deletions

82
reset-password-direct.sh Executable file
View File

@@ -0,0 +1,82 @@
#!/bin/bash
# Direct MongoDB Password Reset
# This bypasses the web interface and sets password directly
ADMIN_EMAIL="admin@skyartshop.com"
NEW_PASSWORD="Admin123!"
echo "=========================================="
echo "Direct MongoDB Password Reset"
echo "=========================================="
echo ""
echo "Resetting password for: $ADMIN_EMAIL"
echo "New password: $NEW_PASSWORD"
echo ""
# Create a C# script to generate the correct PBKDF2 hash
cat > /tmp/hash_password.cs << 'CSHARP'
using System;
using System.Security.Cryptography;
var password = args.Length > 0 ? args[0] : "Admin123!";
using var rng = RandomNumberGenerator.Create();
var salt = new byte[16];
rng.GetBytes(salt);
using var pbkdf2 = new Rfc2898DeriveBytes(password, salt, 10000, HashAlgorithmName.SHA256);
var hash = pbkdf2.GetBytes(32);
var hashBytes = new byte[48];
Array.Copy(salt, 0, hashBytes, 0, 16);
Array.Copy(hash, 0, hashBytes, 16, 32);
Console.WriteLine(Convert.ToBase64String(hashBytes));
CSHARP
# Generate the hash
HASH=$(dotnet script /tmp/hash_password.cs "$NEW_PASSWORD" 2>/dev/null)
if [ -z "$HASH" ]; then
echo "✗ Failed to generate password hash"
exit 1
fi
echo "Generated hash: ${HASH:0:40}..."
echo ""
# Update MongoDB
mongosh --quiet SkyArtShopDB <<EOF
var result = db.AdminUsers.updateOne(
{ Email: '$ADMIN_EMAIL' },
{
\$set: {
PasswordHash: '$HASH',
LastLogin: new Date()
}
}
);
if (result.modifiedCount > 0) {
print('✓ Password updated successfully');
} else {
print('✗ Failed to update password');
}
EOF
echo ""
echo "=========================================="
echo "✓ Password Reset Complete!"
echo "=========================================="
echo ""
echo "Login credentials:"
echo " Email: $ADMIN_EMAIL"
echo " Password: $NEW_PASSWORD"
echo ""
echo "Test login:"
echo " https://skyarts.ddns.net/admin/login"
echo ""
# Clean up
rm -f /tmp/hash_password.cs