GithubHelp home page GithubHelp logo

texttoshare's People

Contributors

bruckna avatar camlegleiter avatar justderb avatar staley7 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

texttoshare's Issues

Implement Lua Code into Project

Steps to be done:

  • Create Lua Wrapper
  • Load in C# function calls
  • Sandbox Lua scripts so they cannot access stuff that may damage system
  • Compile, run, etc.

SqlController - Managing Passwords

Currently, the UserDAO does not store any password information for a user. If the backend creates a new UserDAO object and tries to add this user to the database, there will be exceptions thrown, since currently the users.password column does not accept NULL values.

Need to handle passwords somehow so the database doesn't error like this.

Session Information not persisting between pages

While beginning adding information and layout changes to the Index.aspx page, I've found that the Session variable is not maintaining data between pages. The RegisterUser.aspx page or Login.aspx pages are not saving this for the Index.aspx page to grab additional user information for displaying. Need to look into this further.

CreationException additions

Need to implement CreationExceptions within the SqlController class when null objects are attempted returned.

ParsedMessage, Plugin Library: Message Type Enum

Need to create an Enum for storing different types of messages such as Stop, Suppress, Error and ValidMessage. The ParsedMessage class will set this based on the type of message that is parsed. This will allow for easier checking by the PluginLibrary to determine what kind of message needs to be sent.

Verification Code for Registering Users

Need to add business logic for handling registering users where they enter in a verification code to correctly add their phone information into the database. Need to add associated database methods for accessing the information, as well as a new column in the users table for storing the specific verification code.

Remove unneeded *.cs files from WebSite

All of the code behind for our webpages should be in .aspx.cs files now if they aren't alrady. The corresponding .cs files that we were originally using can then be deleted to prevent future confusion.

PluginLibrary _PluginList variable

Sub-issue of #6

Currently, the PluginLibrary has an instance variable _PluginList that is not being accessed correctly with its corresponding property. This needs to be fixed so the getter/setter is used properly and the property is accessed rather than the _PluginList itself.

See

Plugin - Handle verification code

When a user registers, we do not know their "phone email". This is the way we will get it without the user knowing exactly what it is and also use it to verify themselves. So these are the steps you will need to follow:

  • Create register system plugin.
  • Look-up the first argument given by the user. This will be their register code.
  • If the database returns a UserDAO sent the user email correctly and update it in the database. Else, if it throws a CouldNotFindException, do nothing.
  • When the user has correctly registered, send them back a confirmation message.

SqlController - Deleting Users

Need to ALTER the sp_deleteUser stored procedure; currently, it errors as it "can't find the table [dbo].groupmembers".

Need Error Count for PluginDAO

We need another int column that holds the number of times the plugin trows an exception so that bad plugins can be safely 'shutdown' system-wide until fixed.

MessageParser : Giving a bad message throws exception

t2sBackend.exe!t2sBackend.MessageParser.Parse(t2sBackend.Message message, t2sBackend.IDBController controller) Line 27
t2sBackend.exe!t2sBackend.MessageController.Watcher_RecievedMessage(object sender, t2sBackend.AWatcherService.WatcherServiceEventArgs e) Line 36 + 0x21 bytes
t2sBackend.exe!t2sBackend.AWatcherService.OnRecievedMessage(t2sBackend.AWatcherService.WatcherServiceEventArgs e) Line 26 + 0x11 bytes
t2sBackend.exe!t2sBackend.GMailWatcherService.recievedMessage(uint MessageUID) Line 153 + 0xe bytes
t2sBackend.exe!t2sBackend.GMailWatcherService.Start() Line 126 + 0xb bytes
t2sBackend.exe!t2sBackend.Program.Main(string[] args) Line 29 + 0xb bytes
[External Code]

Message sent:

This is a bad message

Throws an ArgumentOutOfRangeException

Since the regex matcher doesn't find anything it returns an array of length 0. Accessing the zero-ith index throws this exception.

Form Validation on Register/Add*/Manage* Pages

Need to validate all forms by checking content and length.

When checking user input, use the string.IsNullOrWhiteSpace(value) method to ensure they aren't entering null, empty strings or whitespace for their entries.

Each DAO has static readonly ints that store the max length the database allows, so check that the user-inputed values are >= the readonly values.

UserDAO Property Data Types

For UserDAO.UserID:
Should this actually be a nullable type (int?) instead? If a user is created within, say, the PluginLibrary, the UserID will be unknown as it is created upon insertion into the database. This issue could also be extended to GroupDAO.GroupID.

For UserDAO.PhoneNumber:
The database currently stores the phone number as an "int", whereas the UserDAO object stores it as a "string". Should we have the UserDAO.PhoneNumber property and related code work with integers or strings?

Storing IDs in DAOs

  1. We need to have private setters on all DAO primary IDs, to avoid them being changed in the objects and causing insert/update conflicts with existing records in the database.

  2. PluginDAO and GroupDAO have references to their owners--PluginDAO only stores the OwnerID, whereas GroupDAO stores the UserDAO object of the owner. I'm thinking that this should be simplified so that both only store the OwnerID. With this, do we want these to both have private setters as well? If this is the case, and a group/plugin changes ownership hands (since there are FK constraints in the database, meaning they have to match between ownerID and userID), there isn't a clean way to handle this code-wise.

Plugins Table - Failed Attempts column, Extras table

Add a column in plugins called attempts_failed that incrementally adds to the plugin entry. Add methods to the SqlController to:

  • Increment attempt count (if possible to increment and return incremented value in one query, do it)
  • Return attempt count
  • Reset attempt count

Add a table extras with columns key_entry and value_entry, both NVARCHAR(MAX). First tuple should include plugin_threshold => 20.

Add a static class of static const/readonly strings that reference the key_entry column.

Add getValue(string key_entry) and setValue(string key_entry, string value_entry) in SqlController.

UrlEncode All Redirects

Any pages that use a GET-based redirect need to make sure their values are run through HttpUtility.UrlEncode(value) as well.

IPlugin-PluginDAO integration

Any current IPlugin implementations (such as PluginError) need to be updated to work with the new PluginDAO object added to IPlugin.

NOTE: A plugin's command text is currently equivalent to PluginDAO.Name. In the future, we may need to change the structure (for readability) so PluginDAO contains:

  • PluginDAO.Name: The name of the plugin.
  • PluginDAO.Command: The command that is texted to the system.

Implement automatic plugin disabling

The IPlugin.run function is called and surrounded by a try...catch when an exception is throw, this should catch it, log it, then increment the error count for the plugin.

If the error count goes above a certain threshold (which should be defined in the PluginLibrary as a public readonly int)

MessageParser - Testing

Need to write a large set of tests around various user input to check that the MessageParser utility correctly grabs inputs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.