Python Web Framework
Python Web Framework
Django
Django is a programming language that is used to create a variety of websites, including highly
customizable apps like social media websites. Django is a high-level Python Web framework that
promotes quick development and simple, practical design. Its goal is to create a solid foundation of the
fundamentals, allowing developers to focus on portions of their site that are specific to their project
rather than wasting time on template.
The Python source distribution has long adhered to the "batteries included" idea, which entails
providing a robust and adaptable standard library that is instantly available without requiring the user to
download additional packages. In many situations, this provides the Python language an advantage. It
makes the framework a fantastic alternative for any developer looking to create contemporary and
reliable web apps with less code. It's a well-organized framework.
The Django ORM acts as a link between relational database tables and models, removing the need for
massive databases to be maintained and updated. It also supports all major relational databases,
including MySQL and PostgreSQL. Since Django applications can handle enormous datasets, they are
ideal for constructing data-driven content management systems. It also has data-plotting and analysis
capabilities, which may be used to evaluate user data and plan marketing strategies.
Security features:
Django is concerned about security and assists developers in avoiding numerous frequent security
blunders. A Django program is safe and secure, encouraging developers to use appropriate security
practices. SQL injection, Cross-site request forgery, and cross-site scripting injection are all major
security vulnerabilities that it helps developers overcome.
The Django framework is updated with new security fixes on a regular basis, and it also protects against
cybersecurity threats like Clickjacking, CRLF injections, and timing attacks. Advantages come from
security features including user authentication, scanning of user-uploaded data, and multiple user logins
with predetermined access settings.
Security issues:
The Django team is releasing Django 3.2.5 and Django 3.1.13 in compliance with security release policy.
These updates address the "high" severity security problem. Unsensitized QuerySet.order by() input can
lead to a possible SQL injection, according to CVE-2021-35042. Even if a deprecation warning is emitted,
unsensitized user input passed to QuerySet.order by() might evade intended column reference
validation in a path labeled for deprecation, resulting in a possible SQL injection.
Web2py
web2py is a free, open-source web framework written in Python and programmable in Python for
developing secure database-driven web applications efficiently. web2py is a full-stack framework, which
means it includes everything need to create fully working web applications. The offered web interface
may be used for application development, deployment, debugging, testing, database management, and
maintenance. The Model-View-Controller design is used by the web2py framework to execute web
applications. Web2py's model-view-controller representation as follows:
Components Details
Model
Security features:
web2py is designed to be secure. As a result, it automatically tackles many of the issues that might lead
to security flaws. web2py comes with a flexible and robust Role Based Access Control system (RBAC).
RBAC (Role-Based Access Control) is a method of limiting system access to only authorized users. The
web2py class that implements RBAC is called Auth. The AUTH database scheme:
The names of the roles and permissions are not restricted in general; the developer can construct them
to fix the roles and permissions in the organization. Web2py offers an API to check if a user is logged in,
if a user is a member of a particular group, or if a user is a member of any group with a specified
essential permission once they have been created. Decorators in web2py may be used to limit access to
any function depending on login, membership, and permissions.
Security Issues:
According to the Security Bulletin, various security vulnerabilities have been discovered in web2pay. The
previous version of web2py may contain authentication flaws. The "critical" severity security issue is
addressed by these releases(CVSS Version 3). This vulnerability has the CVE-id: CVE-2016-10321, which
means it may be exploited to bypass security measures. This enables a remote attacker to undertake
brute-force password attempts. The flaw exists because the program does not properly check if a host is
denied before requesting a password. A password brute-force assault on the targeted system can be
carried out by a remote non-authenticated attacker.
References
https://www.djangoproject.com/weblog/2021/jul/01/security-releases/
https://wiki.python.org/moin/WebFrameworks
https://www.monocubed.com/django-web-framework/
https://www.netguru.com/blog/why-use-django
https://djangostars.com/blog/why-we-use-django-framework/
http://web2py.com/books/default/chapter/29/09/access-control
https://www.tutorialspoint.com/web2py/web2py_quick_guide.htm
http://web2py.com/books/default/chapter/34/01/introduction
https://www.cybersecurity-help.cz/vdb/SB2019062810