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.
这是一个 Python 模块,为 Django 提供手写签名字段,以及手写签名的网页控件,感谢 jSignatrue 项目为本模块提供支持。
安装并注册模块
# pip install django-canvas-field
# File: settings.py
INSTALLED_APPS = [
"canvas",
]
在模型中使用
from canvas.fields import SignCanvasField
class Simple(Model):
name = CharField(max_length=20, unique=True)
sign = SignCanvasField(null=True, blank=True)
使用签名控件
from django import forms
from canvas.widgets import SignCanvasWidget
from .models import Simple
class SimpleForm(forms.ModelForm):
class Meta:
model = Simple
widgets = {
'sign': SignCanvasWidget()
}
SignCanvasWidget
是 django.forms.widgets.Textarea
的子类,使用自定义的模板 sign_canvas.html
。SignCanvasField
是 django.db.models.TextField
的子类,表单字段指向 SignCanvasWidget
。
FAQs
SignCanvasField
We found that django-canvas-field demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.