Commit Graph
13 Commits
Author SHA1 Message Date
whoswhip 410172f922 Update rate limiters, endpoints, and UI styles
Added a new "fixed-xl" rate limiter policy with a permit limit of 16 and applied it to several endpoints. Replaced "fixed-bigger" with "fixed-xl" on some endpoints. Introduced a new POST endpoint `/api/pastes/admin/change-id` for changing paste IDs, including authorization checks and error handling. Enhanced logging for paste edits to include paste ID and user info. Adjusted rate limiting policies for various endpoints to use "fixed-bigger" instead of "fixed".

Modified UI styles: changed `.nav-div` margin-top in `index.html` from 10px to 1.5px, increased `backdrop-filter` blur in `paste.html` and `privatepaste.html` from 2.5px to 5px, added a border to `.input-wrapper-container` in `paste.html` and `privatepaste.html`, removed the title attribute from `<h1>` in `privatepaste.html`, simplified JSON parsing in `fetchInfo` function, removed redundant localization code, and updated `.user-a` class to use `:any-link` pseudo-class.

Various minor adjustments to improve code readability and maintainability.
2024-10-19 15:19:09 -04:00
whoswhip eb542342c9 Hot fixes, changed every single writeasjsonasync to writeasync cause it would bug some other stuff,fixed the authentication api which for some reason redirected to lost paste???? 2024-10-19 00:46:19 -04:00
whoswhip 878cebacb6 Enhance null safety, UI, and SQL query handling
Improved null safety in `Program.cs` by using the null-conditional operator (`?.`) when accessing cookies. Modified SQL queries to exclude 'Unlisted' pastes and added checks to skip processing 'Private' or 'Unlisted' pastes. Adjusted the command to count total pastes to exclude 'Unlisted' pastes.

Updated `admin/user.html` to support multiple notifications, added functionality to copy the new password to the clipboard, and improved notification display and animation logic.

Removed a hardcoded paste link from `archives.html` which was for testing.

Enhanced `index.html` with a hamburger menu for mobile navigation, improved notification handling, and added CSS styles and media queries for better mobile support. Fixed minor formatting issues and improved code readability.
2024-09-09 21:41:06 -04:00
whoswhip 560ad071ab Add private pastes, user bans, and UI enhancements
Enhanced Program.cs with response caching, compression, CORS policy, and private paste handling.
Refactored user ban logic and added expiration date handling.
Improved admin.html with localization and overflow handling.
Introduced PrivatePaste and Punishment classes.
Enhanced Paste and User classes for private pastes and punishments.
Updated initialization logic for punishedUsers table.
Ensured salts are written back to config.json if generated.
Enhanced user.html with ban/unban functionality and animations.
Improved archives.html, dash.html, and index.html with new UI elements and styles.
Added asynchronous content loading and notifications to paste.html.
Introduced Encryption.cs for AES encryption and decryption.
Created banned.html for displaying error messages.
Added privatepaste.html with dynamic content, password protection, and user interactions.
2024-09-08 16:07:59 -04:00
whoswhip 071434efc9 Enhance security, add admin features, and improve UX
Removed unused cryptography directive and switched to BCrypt for hashing IPs and tokens with a configurable salt. Updated file paths for cross-platform compatibility. Added rate limiting to routes and new admin API endpoints for user management. Improved `config.json` handling and added random password generation.

Enhanced `admin.html` with search debounce, infinite scrolling, and updated CSS. Added password change functionality and notifications to `user.html`. Improved error handling in `archives.html` and refactored `index.html` for better readability. Corrected password character count in `signup.html`.
2024-09-07 18:57:18 -04:00
whoswhip f02e68b1d3 Enhance validation, logging, and UI/UX improvements
## COMMIT MESSAGE GENERATED BY COPILOT

Added JSON validation to multiple endpoints, ensuring valid JSON requests and improved error handling. Updated logging to use `DateTime.Now` and append to `logs.log` for specific actions. Enhanced `/api/accounts/login` with JSON validation and refactored for consistency.  Improved admin and user interfaces with search functionality, better date localization, and CSS adjustments. Enhanced error handling and feedback in `login.html` and `signup.html`, and improved search functionality in `archives.html`.
2024-09-07 13:59:33 -04:00
whoswhip c3ac47171f Admin panel and punishments 2024-08-26 05:30:39 -04:00
whoswhip 79276573bc Signup api, signup and login frontend 2024-08-23 12:26:41 -04:00
whoswhip 017abcfacc Account Creation, Logging, and API URI's changed 2024-08-23 09:49:03 -04:00
whoswhip 59fe4caa4d Commit Message Generated by Copilot
Enhance date handling, error checks, data limits, and rate limiting

- Added `using System.Globalization;` to support date and time formatting.
- Handled empty/null paste titles with defaults and truncation.
- Display paste dates as human-readable time differences.
- Changed rate limiting policy to "fixed-bigger".
- Improved error handling for `/api/create` endpoint.
- Updated `ConvertToBytes` method for clarity.
- Added `GetDifference` method for date comparisons.
- Enforced length limits on input fields in `index.html`.
2024-08-19 04:46:58 -04:00
whoswhip 47aed18919 Improvement to pastes archive, added navigator to the top of each page 2024-08-19 03:45:06 -04:00
whoswhip 3be5f90220 Last commit didnt add everything :( 2024-08-18 23:50:58 -04:00
whoswhip d76331b01e Add project files. 2024-08-18 21:55:50 -04:00