Files
Tools/frontend/src/components/Md5Tool.jsx
T
Nirodan 80ec5eca7b Security, code quality and frontend improvements
- Move SECRET_KEY out of docker-compose into .env (env_file), add .env.example
- Add flask-limiter with 10 req/min on login route; introduce util/limiter.py
- Replace direct mysql.connector.connect() calls with MySQLConnectionPool via util/db_pool.py
- Fix deprecated datetime.utcnow() -> datetime.now(timezone.utc) in auth/login.py
- Remove dead /api/scripts 410 route from admin.py
- Add MD5 security warning in Md5Tool.jsx
- Add ErrorBoundary component and wrap App.jsx
- Expand README with setup guide, screenshot and project structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 13:52:53 +02:00

39 lines
1.1 KiB
React

import { useState } from 'react';
import axios from '../services/api';
function Md5Tool() {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
const hashPassword = async () => {
try {
const res = await axios.post('/api/hash/md5', { password: input });
setResult(res.data.md5);
} catch (err) {
alert('Fehler beim Hashen');
}
};
return (
<div className="main-content">
<h2>MD5 Hasher</h2>
<p style={{ color: '#e07b00', fontSize: '0.875rem', marginBottom: '0.75rem' }}>
<strong>Sicherheitshinweis:</strong> MD5 ist kryptografisch unsicher und darf
nicht zum Hashen von Passwörtern verwendet werden. Für Passwörter bitte
bcrypt, Argon2 oder scrypt einsetzen.
</p>
<input
type="text"
value={input}
onChange={(e) => setInput(e.target.value)}
placeholder="Eingabe"
/>
<button onClick={hashPassword}>Hash berechnen</button>
{result && <p><strong>MD5:</strong> {result}</p>}
</div>
);
}
export default Md5Tool;