Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
tgext.langdomain is a TurboGears2 extension that supports detecting the user language from the domain it is connecting from.
tgext.langdomain can be installed from pypi::
pip install tgext.langdomain
should just work for most of the users.
To enable tgext.langdomain put inside your application
config/app_cfg.py
the following::
import tgext.langdomain
tgext.langdomain.plugme(base_config)
or you can use tgext.pluggable
when available::
from tgext.pluggable import plug
plug(base_config, 'tgext.langdomain')
langdomain will force the language of the current request based on: Top Level Domain, SubDomain and param unless there is already a language stored into the session.
By default none of those behaviours is enabled
When plugging langdomain the following options to turn on behaviours are available:
*param* -> Name of the GET param used to force language, ``True`` means ``lang``.
*tld* -> Dict of *tld* that map to a language
EXAMPLE::
plug(app_cfg, 'tgext.langdomain',
tld={
'com': 'en',
'it': 'it'
})
*subdomain* -> Dict of subdomains that map to a language
EXAMPLE::
plug(app_cfg, 'tgext.langdomain',
subdomain={
'en': 'en',
'it': 'it'
})
When requests are performed like it.server.net it will lookup it inside
the subdomain
dictionary and net inside the tld
dictionary.
FAQs
TurboGears2 extension for detecting user language from the domain
We found that tgext.langdomain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.