Coder Social home page Coder Social logo

albianwarp / albianwarpserver Goto Github PK

View Code? Open in Web Editor NEW
11.0 9.0 1.0 1.58 MB

Albian Warp Server component!

Home Page: https://blog.albianwarp.com

License: GNU General Public License v3.0

Python 4.21% Shell 0.01% JavaScript 82.12% HTML 4.30% Dockerfile 0.07% CSS 9.29%

albianwarpserver's Introduction

AlbianWarpServer

The AlbianWarpServer is a Flask based application providing Restful endpoints for uploading/sending messages and creatures, as well as a websocket endpoint for sending and receiving messages.

Getting started

You dont need to install the Warp Server to get started, as there should be one up and running hosted by the Albian Warp Project/Team.

Installation from source

this section is still under construction

Built With

Contributing

Contributions are very welcome!

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL3 License - see the LICENSE.md file for details

albianwarpserver's People

Contributors

keyboardinterrupt avatar ligfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ligfx

albianwarpserver's Issues

Login is not case sensitive for Users!

This leads to a problem where you cannot receive Creatures as they are addressed to your Username with correct spelling i.E.

if the Username is: Ham5ter
and you login as hAM5ter or ham5ter you wont receive Creatures!

Prefill Contact List with everyone

To enable online functionality like sending mail and creatures to someone, a contact is needed.

To get things going we should simply add everyone registered to the contact list.

For this to work the server must provide an Endpoint that returns a list of all users available.

This can be enhanced later on of course!

MySQL server has gone away

MySQL server has gone away

2020-04-01T20:18:15.286475350Z [2020-04-01 20:18:15,266] ERROR in app: Exception on /rebabel/who_is_online [GET]
2020-04-01T20:18:15.286540421Z Traceback (most recent call last):
2020-04-01T20:18:15.286549630Z   File "/usr/local/lib/python3.8/site-packages/flask_sockets.py", line 40, in __call__
2020-04-01T20:18:15.286555279Z     handler, values = adapter.match()
2020-04-01T20:18:15.286560149Z   File "/usr/local/lib/python3.8/site-packages/werkzeug/routing.py", line 1945, in match
2020-04-01T20:18:15.286565334Z     raise NotFound()
2020-04-01T20:18:15.286570547Z werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-04-01T20:18:15.286576117Z 
2020-04-01T20:18:15.286580717Z During handling of the above exception, another exception occurred:
2020-04-01T20:18:15.286585362Z 
2020-04-01T20:18:15.286589937Z Traceback (most recent call last):
2020-04-01T20:18:15.286594430Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1247, in _execute_context
2020-04-01T20:18:15.286599554Z     self.dialect.do_execute(
2020-04-01T20:18:15.286604124Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
2020-04-01T20:18:15.286609217Z     cursor.execute(statement, parameters)
2020-04-01T20:18:15.286614034Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
2020-04-01T20:18:15.286619230Z     res = self._query(query)
2020-04-01T20:18:15.286624040Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 315, in _query
2020-04-01T20:18:15.286628697Z     db.query(q)
2020-04-01T20:18:15.286633087Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/connections.py", line 239, in query
2020-04-01T20:18:15.286637939Z     _mysql.connection.query(self, query)
2020-04-01T20:18:15.286642552Z MySQLdb._exceptions.OperationalError: (2006, 'MySQL server has gone away')
2020-04-01T20:18:15.286647562Z 
2020-04-01T20:18:15.286651822Z The above exception was the direct cause of the following exception:
2020-04-01T20:18:15.286656312Z 
2020-04-01T20:18:15.286660574Z Traceback (most recent call last):
2020-04-01T20:18:15.286665457Z   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
2020-04-01T20:18:15.286670280Z     response = self.full_dispatch_request()
2020-04-01T20:18:15.286674742Z   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
2020-04-01T20:18:15.286695069Z     rv = self.handle_user_exception(e)
2020-04-01T20:18:15.286699492Z   File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 272, in error_router
2020-04-01T20:18:15.286703644Z     return original_handler(e)
2020-04-01T20:18:15.286707567Z   File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 272, in error_router
2020-04-01T20:18:15.286711694Z     return original_handler(e)
2020-04-01T20:18:15.286716582Z   File "/usr/local/lib/python3.8/site-packages/flask_restful/__init__.py", line 272, in error_router
2020-04-01T20:18:15.286720963Z     return original_handler(e)
2020-04-01T20:18:15.286724882Z   [Previous line repeated 1 more time]
2020-04-01T20:18:15.286728782Z   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
2020-04-01T20:18:15.286733072Z     reraise(exc_type, exc_value, tb)
2020-04-01T20:18:15.286736979Z   File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
2020-04-01T20:18:15.286741254Z     raise value
2020-04-01T20:18:15.286745209Z   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
2020-04-01T20:18:15.286749359Z     rv = self.dispatch_request()
2020-04-01T20:18:15.286753277Z   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
2020-04-01T20:18:15.286757540Z     return self.view_functions[rule.endpoint](**req.view_args)
2020-04-01T20:18:15.286761532Z   File "/app/warpserver/server.py", line 46, in rebabel_who_is_online
2020-04-01T20:18:15.286765696Z     for user in User.query:
2020-04-01T20:18:15.286769732Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3403, in __iter__
2020-04-01T20:18:15.286774036Z     return self._execute_and_instances(context)
2020-04-01T20:18:15.286777979Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3428, in _execute_and_instances
2020-04-01T20:18:15.286782253Z     result = conn.execute(querycontext.statement, self._params)
2020-04-01T20:18:15.286786251Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 984, in execute
2020-04-01T20:18:15.286790438Z     return meth(self, multiparams, params)
2020-04-01T20:18:15.286794351Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection
2020-04-01T20:18:15.286798562Z     return connection._execute_clauseelement(self, multiparams, params)
2020-04-01T20:18:15.286802568Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_clauseelement
2020-04-01T20:18:15.286839848Z     ret = self._execute_context(
2020-04-01T20:18:15.286845271Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1287, in _execute_context
2020-04-01T20:18:15.286856636Z     self._handle_dbapi_exception(
2020-04-01T20:18:15.286860794Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1481, in _handle_dbapi_exception
2020-04-01T20:18:15.286865039Z     util.raise_(
2020-04-01T20:18:15.286869401Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
2020-04-01T20:18:15.286873578Z     raise exception
2020-04-01T20:18:15.286877522Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1247, in _execute_context
2020-04-01T20:18:15.286881799Z     self.dialect.do_execute(
2020-04-01T20:18:15.286886668Z   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute
2020-04-01T20:18:15.286890996Z     cursor.execute(statement, parameters)
2020-04-01T20:18:15.286894971Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
2020-04-01T20:18:15.286899278Z     res = self._query(query)
2020-04-01T20:18:15.286903304Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 315, in _query
2020-04-01T20:18:15.286907444Z     db.query(q)
2020-04-01T20:18:15.286911939Z   File "/usr/local/lib/python3.8/site-packages/MySQLdb/connections.py", line 239, in query
2020-04-01T20:18:15.286918599Z     _mysql.connection.query(self, query)
2020-04-01T20:18:15.286924889Z sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (2006, 'MySQL server has gone away')
2020-04-01T20:18:15.286933436Z [SQL: SELECT users.id AS users_id, users.date_created AS users_date_created, users.date_modified AS users_date_modified, users.username AS users_username, users.password_hash AS users_password_hash, users.email AS users_email, users.power AS users_power, users.note AS users_note, users.locked AS users_locked 
2020-04-01T20:18:15.286940779Z FROM users]

Apparently there is a Timeout issue with the MySQL Server.

Admin Interface

We need an accessible Admin interface so we are able to lock down accounts, monitor maliccious behavior like spam and stuff, and be able to manage Stuff.

Incoming creatures sometimes go to containment chamber despite settings

I have my containment chamber configured with no one in either the "send to" or "receive from" lists, and I have two separate portals created, one for incoming creatures set to receive from "any on-line user" and out for outgoing creatures set to send to "any on-line user". With this setup, I would expect that any incoming creatures would go to my configured portal, and never go to the containment chamber, but it seems that creatures occasionally pop into the chamber regardless. I am not sure if this is a change of behavior from the original warp, but I think being able to disable the containment chamber from receiving would be a good thing to have, if it's possible to implement. I've seen this issue with both the old Albian Warp client and the new Rebabel implementation.

Registration form should actually check its fields.

Currently everything is accepted as input. even "nothing" at all.
This should not be possible.
Stuff needed:

  • password security policy
  • rudimentary e-mail address check
  • allow only usernames containing characters in [a-z],[A-Z] and [0-9]
  • allow only usernames with at least 3 and maximal 18 characters

Bonus points (could be separate issues):

  • disallow usernames like Admin, System, albianwarp, warp, dockingstation and so on... possible list
  • do actual verification of accounts by sending an Email with a verification Link

Add README.md an LICENSE.md

This project needs a README.md
also a LICENSE.md is needed showing that this Project is licensed under GPL3

DMAs/RTDMAs to multiple people?

While we've talked about implementing a group feature, do you think it might be quicker/easier in the meantime to do something like allowing commas (or another delimiter) used in the 'aw_recipient' field to separate multiple usernames and then have the server parse and send a copy of that RT/DMA to each user?

User Invisibility

It would be neat if somewhere down the line a user could choose to 'appear offline' so they don't show up as online in the contacts of others, but can still send and receive messages, chat requests, creatures, etc.

Implementing this in a way that users can't see through might be very challenging and potentially require rewriting a lot of stuff, so it's probably best saved for when we are overhauling other stuff like server-based friend/foe lists. But we can talk about it here.

As things currently stand, simply removing an "invisible" user from the public Online Users list would come at the cost of that user being able to use chat functions (and other RTDMAs), receive randomly-sent creatures, or receive creatures through portals. Since people can still send and receive messages and creatures regardless of online status, enabling something like this in the meantime might be better than nothing? It would depend on how in-demand of a feature this becomes.

Rate Limitations

The Server should have rate limitations to avoid abusive behavior like Spamming another player with creatures or messages.

Remove ReBabel Code

The ReBabel Code fudged into the Server must be removed, and the original Getting Started guide (on the Webinterface) needs to be restored.

A User cannot be deleted if there are still Creatures, and probably other Resources, present, that link to said user.

This is because of a missing strategy for deletion of dependent resources.

sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`db_albianwarp`.`creatures`, CONSTRAINT `creatures_ibfk_2` FOREIGN KEY (`recipient_user_id`) REFERENCES `users` (`id`))') [SQL: 'DELETE FROM users WHERE users.id = %s'] [parameters: (46,)] (Background on this error at: http://sqlalche.me/e/gkpj)

Player / User Documentation

We need Good Documentation for Players on how to connect their Games to AlbianWarp via ReBabel.

Another Guide is needed on how to remove the old AlbianWarp Game Modifications and set up a new World ready for ReBabel :)

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.