
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
All documentation on this site and parameters were taken from this documentation.
dotnet add package Blazor.FocusTrapJs
Program.cs
builder.Services.AddScoped<FocusTrapJsProvider>();
This is a basic library that provides access to the focus-trap
library and makes it easy to capture focus within a DOM node.
There may come a time when you find it important to catch focus inside a DOM node - so that when the user presses Tab or Shift+Tab or clicks the mouse, the user cannot escape from a particular loop of focused elements.
The template must have tabindex
otherwise nothing will work.
@inherits FocusTrapComponent
@implements IAsyncDisposable
<div id="@_id">
<div tabindex="0"></div>
</div>
@code {
private string _id => $"F{GetHashCode()}";
[Inject] public required FocusTrapJsProvider FocusTrap { get; set; }
[Parameter] public EventCallback<bool> OnFocusChanged { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await FocusTrap.InitTrap(_id, DotObj, Settings);
}
await base.OnAfterRenderAsync(firstRender);
}
[JSInvokable]
public override async ValueTask OnActivate()
{
await OnFocusChanged.InvokeAsync(true);
}
[JSInvokable]
public override async ValueTask OnDeactivate()
{
await OnFocusChanged.InvokeAsync(false);
}
public async ValueTask DisposeAsync()
{
await FocusTrap.RemoveTrap(_id);
}
}
FAQs
Trap focus within a DOM node.
We found that blazor.focustrapjs 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.