Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Website Button Rate Limiting #33

Open
ghost opened this issue Jun 30, 2021 · 0 comments
Open

Website Button Rate Limiting #33

ghost opened this issue Jun 30, 2021 · 0 comments
Assignees
Labels
bug / issue Something isn't working or is behaving in a way that isn't expected by users. good first issue Good for people to start with Pamaxie. If combined with "complex problem" research is required.
Projects

Comments

@ghost
Copy link

ghost commented Jun 30, 2021

Currently spamming our websites buttons (except the ones for redirects) could cause a crash of our webserver. This should not happen. Please validate every button and increase a rate limit on a session basis so people cant just spam buttons to kill our website.

@ghost ghost added bug / issue Something isn't working or is behaving in a way that isn't expected by users. good first issue Good for people to start with Pamaxie. If combined with "complex problem" research is required. labels Jun 30, 2021
@ghost ghost added this to To Do in Pamaxie via automation Jun 30, 2021
@ghost ghost changed the title Website block buttons for a few seconds Website Button Rate Limiting Jun 30, 2021
@PKoldborg PKoldborg self-assigned this Aug 24, 2021
PKoldborg added a commit that referenced this issue Aug 24, 2021
ghost pushed a commit that referenced this issue Dec 9, 2021
* Fix wierd problems

* Code Simplified & Website UI Scaling Fixed

* About Items back-color more pleasing

* Code Simplified

* #17 Initial Implementation Content Type Detection

* #17 Improvements to Content Type Detection and commented public stuff

* Adjusted Namespaces of Pamaxie.Api

* #17 Optimized Algorithm and implemented more file Types

Basically optimized the algorithm for more use cases and implemented more file types it supports. Also made it more easily accessible and less demanding. There is still some work to do before its done but most work is there.

* #24 Unit tests for ImageProcessing

* Update README.md

* #24 Unit test for TokenGenerator.cs

* #24 Reference for Newtonsoft.Json and added appsettings.test.json to the project

* Added appsettings.test.json to .gitignore

* Fixed the wrong path, ref 3c42ef8

* #34 Moved ImageProcessing.cs to it's own assembly

* #34 Removed unnecessary comment

* #34 Fixed issue where DownloadFile was referring to the path before it got moved.

* Add a few comments to stuff 

Have  to check this in cause my local repo has issues and I dun wanna loose this work

* #8 Completion of initial implementation

Initial implementation of Media Detection is complete.

* #13 Progress on Contribution Guideline

* Removed warnings and unnecessary checks for AuthController.cs & VisionController.cs

* Made changes to RefreshTask() in AuthController.cs so it matches LoginTask() more

* Several Optimizations, excluding Website restructuring

This does not include the restructuring of the website but most other things are included. (Website will be done today or tomorrow)

* Fixed API usings

* Undo Changes

* Revert Changes

* Moved Data into its own assembly and removed unnecessary usings

* Fixed most warnings except for website

* Auto stash before merge of "dev" and "origin/dev"

* #36 Initial structuralisation of Blazor website

* #6 Website SFG, between Header and MudCarousel, redesigned

* #6 Fixed small style mistake for SVG

* #37 Fixed cookie dialog not showing up, and removed website warnings

* Removed a old folder that should have been deleted some time ago, since the project got moved to another location

* #38 Seperated Sql & Redis from Pamaxie.Database.Extensions into Pamaxie.Database.Extensions.Sql.csproj and Pamaxie.Database.Extensions.Redis.csproj

* Logout now have a returnUrl that can be used & changed some Rider suppress messages to comments as they work the same way.

* Redirect returnUrl needed a base path

* #26 EmailVerificated added to EF database, EmailSender.cs set up, and able to send the user a email, also EmailConfirmation body made (might be changed in the future). UserService.cs is able to show a "Please verify your email" popup when trying to click on 'create application' button.

* #39 Pamaxie.Tooling - UI Implementation / Rewrite

Rewrote part of pamaxies Tooling with UWP to have a UI. There is probably still bugs in it but its functional so far.

* Changed workflows so they run on Windows

* Update codeql-analysis.yml

* #39 Pamaxie.Tooling - Optimization and implementation of cancellation

Added cancellation and optimized loading as well as saving a bit. The software is currently a bit hard to read this needs to be rewritten. I suspect that this may cause bugs in non optimal scenarios too.

* #26 Email verification done, and updates the user on the database.

* #26 Token expiration date and a few testing methods for encoding and decoding the token

* Pamaxie.API - Changed name of Vision Controller and added requests

* Pamaxie.Data - Resetting the timeout when storing File Hashes in Redis

* Pamaxie.Clustermanagament - Initial Checkin and Adding the GRPC server

* #26 Email Verification body updated.

* Temporarily build fix

* Optimised Imports

* #26 Email Verification Fix

* #42 added class files for each url and into the dbSets for our SqlDbContext.cs

* #24 Testing structure set up for Pamaxie.Website with mocking.

* Pamaxie.Database.Api.csproj was referring to a assembly that did not exist anymore

* Delete JsonWebTokenTest.cs

Was supposed to be moved, but ended up duplicated.

* Removed appsettings.test.json

* #24 More testing data and easily expandable for Test.Pamaxie.Website

* #24 ClaimExtension.cs accessibility and Misspelled a property name

* Removed some information that will be moved to the wiki

* TestProfileData.cs had the wrong configuration section

* Renamed TestMemberData.cs to MemberData.cs for less confusion.

* #24 Reworked the Testing structure to be less repeatable.

* Overwork Pamaxie.ImageSorting Tooling into new UI

* Fixed Overlapping UI Elements

* Pamaxie.Tooling - Fix Too high accuracy in prediction time.

* Deleting all kinds of old stuff (This is more than broken.)

* Breaking even more stuff... like I do

* #39 Pamaxie.Tooling - Fixed issue with creating a ton of new Models

* #43 Minor fixes to the website that can be done at the moment, and added a interface for PamaxieApplication.cs

* #43 Fixed everything for the testing classes that can be done for now.

* #43 Fixed everything for the testing classes that can be done for now.

* #43 Website errors fixed for the new database structure

* #43 Fixed visual errors in Test.Pamaxie.Website, mocking is still required for some of the tests to work

* Added some summaries for some testing methods that had them missing

* #43 Fixed a few visual errors for Test.Pamaxie.Api, mocking is still needed to be implemented for some methods to work

* #43 fixed visual errors for Pamaxie.Api.csproj

* Added a bunch of missing summaries

* Changed method order

* #13 Updated CONTRIBUTING.md

* #13 Updated missing whitespace for sub titles

* #13 Removed repetitive parts and changed text style a bit in a few places.

* #13 Added guideline for documentation

* Updated Packages

* #33 Button rate limit

* Fixed reference error

* #44 cleaned up the code and added comments (#45)

Seems to all work fine.

* #43 Reworking Server Side (behind API) Database Connection

* #43 Reworked a bit more stuff relating to server side

* #43 Moved projects to a folder location fitting the directory structure. And added missing implementations for DataServices

* #43 Extension methods for Pamaxie.Database.Extensions.Client

* #43 Adjusted the approach on how the Database.Client will be used

* Visually removed error for UserServiceTest.cs

* #43 Minor adjustments

* #43 Small changes and some dependency fixes

* #43 Added testing projects for the database projects, and added/adjusted some summaries of the other testing projects

* #43 Implemented test classes for Database.Api

* #43 Removed api test calls through httpclient

* #43 Methods ApplicationController.cs and UserController.cs are created with unit tests.

* #43 Test for TokenGenerator.cs and minor adjustments

* #43 Redesigned testing structure a bit

* Added summaries for BaseTest.cs

* #43 Moved test instance and password to appsettings.test.json

* Removed a testing method, that was not supposed to be committed

* #43 Mocking for UserDataService.cs and ApplicationDataService.cs, changed summaries to make more sense for our design

* #43 Reformatted code for Testing projects

* #43 Mocked Application Create, adds the key to the owner's ApplicationKeys list & mocked VerifyAuthentication implemented

* Minor changes to summaries

* This newline triggered me

* #43 Moved DataService mock calls to constructor

* #43 Test class for MockUserDataService.cs

Still in progress

* #43 Test for all mocked DataService interactions and added GetOwner for application

* Removed AuthorizationTokenCipher from application testing data.

* Removed BCryptExtension.cs

* #43 Disabled Test Parallelization

* Removed newline that accidentally made it into 6f1a35

* Removed Base from file names

* Added GetOwner to ApplicationDataService.cs in .Server

* #43 Removed dependency for .Server in Test.Base.csproj, uses the interface instead

* #53 - Added methods to get the user Id from the bearer token

* Test fix for b8bf940

* #43 - Changed Folder structure and optimized some code.

* Reset Commit to fix issues

* Added code style

* #43 Minor Changes

* Fixed cause cold was annoyed at me for putting it somewhere wrong :(

* Auto stash before merge of "database-rework" and "origin/database-rework"

* #43 fixed some minor problems with 8d8fbe7

* #43 Fixed some stupid dependency injections, updated assemblies.

* #43 Fixed a issue where a service could not be constructed

* #43 Small fixes

* #43 Created worker services for distribution

* #40 Create projects for analysis (WorkerServices)

* Remove unused files / folders

* Moved more of the folders around to fix the folder structure

* #43 Fixed dependency issues, removed unused NuGet packages, fixed warnings, cleaned up a bit code & added test project for Pamaxie.WorkerService.Api.csproj & Pamaxie.Jwt.csproj

* #43 Changed testing namespaces, added some testing projects and classes, added testing methods and data for ImageProcessing.cs & fixed a warning in NavMenu.razor

* #43 added missing NuGet Package for running tests

* #43 Fixed Stream.Position = 0 throwing 'Specified argument was out of the range of valid values.'

* #43 added a few FileTypes, Test data for ImageProcessingTest.cs and fixed a issue in ImageProcessing.cs

* #43 Testing for FileDetection.cs

* Small changes

* Reformatted and cleaned up code

* #43 Testing fully done for all Assembly projects, and fixed a issue in TokenGenerator.cs where it would not return the correct claim

* #43 Sealed most classes

* #43 Changed T from being IPamaxieUser/IPamaxieApplication to be PamaxieUser/PamaxieApplication and added Redis database mocking for Database.Api testing

* #43 Some testing progress on Database.Api

* #43 Tests for Database.Server & Database.Client, fixed a lot of other tests and small stuff in other projects

* #43 Some code cleanup

* #52 Reworked ApplicationController.cs and added Swagger for easy testing when debugging. Tests are broken and will be fixed another day.

* #52 Reworked the database controllers to use proper status codes

Testing classes still needs to be reworked, but will not be done for this issue, as all testing projects will be changed to fit the style guide

* #52 Small fixes

* #43 Changed MemberData.cs and changed all tests for Pamaxie.Database.Api

* #43 All test projects reworked to fit current style guide

* #43 Changed ImageProcessing, Jwt, MediaDetection, Database.Client, Database.Server and .Api for the new style guideline & minor fixes for testing methods.

* #43 Added Status404NotFound for HttpGet if the key does not exist

* #43 Database.Client implemented with test classes & added a missing controller method for Database.Api

* Minor cleanup

* #43 Minor test fixes

* #43 Optimizations in the Client and Api

* #43 Minor cleanup

* #43 fixed Database.Client test methods, worked on some TODOs & moved some setting validation/generation into it's own helper project

* #43 Split generation sections up, added a bit more validation for SettingsValidation.cs & SettingsGeneration.cs can now save the configuration file

* #43 Small friday fixes and changes

* #43 Small Friday improvements and changes

* #43 Moved ServerBase.cs and ApiBase.cs out of Test.Base.csproj to prevent all test projects to have access to .Client and .Server, changed how the Database.Server and Database.Client will handle DataContext

* #54 appsettings.test.json removed and configuration is now generated

* Some summary updates

* Auto stash before merge of "database-rework" and "origin/database-rework"

* #43 Fixed merge Conflicts and errors

* Testing if commits work again

* Test if verification works now

* #43 Finished Design on Server Side implementation

* Finished work on the configuration and started working on the API

* #43 Finished work on the configuration and started working on the API

* #43 smaller fixes to auth and db design

* Updated the Token Generation Logic

* Fixed Authentication for Database API

* Merge fix

* Partial Checkin (#58)

* Fixed a bug in the authentication of the Database API

* Started implementation of C# Client.

* Checkin, fixed a bunch of errors. Removed things that aren't needed

* Fix workflow

* Fixed Warnings and some Build Errors

* Update dotnet.yml

Co-authored-by: Patrick Koldborg <akoldborg@gmail.com>
Co-authored-by: Patrick Koldborg <47462479+PKoldborg@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / issue Something isn't working or is behaving in a way that isn't expected by users. good first issue Good for people to start with Pamaxie. If combined with "complex problem" research is required.
Projects
Pamaxie
To Do
Development

No branches or pull requests

1 participant