
Research
/Security News
11 Malicious Go Packages Distribute Obfuscated Remote Payloads
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
It is very easy to enable lazy loading of partial with scroll in views.
You only use step_render
method instead of render
method.
Likewise, you can lazy load a fragment cache.
Add this line to your application's Gemfile:
gem 'step_render'
And then execute:
$ bundle
This plugin depends on lazysizes.
If you do not import lazysizes to your application, load import_step_render
method in required view.
application.html.erb
<head>
~~~
~~~
<%= import_step_render %>
~~~
</head>
Add the following line to the routes.rb
.
routes.rb
Rails.application.routes.draw do
~~~
mount_step_render
~~~
step_render
method instead of render
methodReplace render
helper method used to rendering the partial with step_render
.
Partial must be specified as an absolute path.
app/views/top/index.html.erb
<%= step_render 'top/partial_name' %>
step_cache
method instead of cache
methodReplace cache
helper method used to fragment cache with step_render
.
app/views/top/index.html.erb
<%= step_cache 'cache_key', skip_digest: true, expires_in: 24.hours %>
~~~
~~~html tags
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that step_render demonstrated a not healthy version release cadence and project activity because the last version was released 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 uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).