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.
@jimdo/md5-loader
Advanced tools
#md5-loader
The md5 loader lets you import
the checksum of a directory as a variable.
In a redux app there is the chance you want to persist the store or parts of it in the localStorage
/sessionStorage
and rehydrate your app on page-reload or a later session.
However this means you may get very old data from the store if your app has changed significantly in the mean time. Therefore you need some kind of versioning in the localStorage/sessionStorage.
The md5-loader allows you to get the md5-checksum of e.g. your reducer
-directory, so everytime a reducer changes, the version for the store will change. This allows you to check on rehydration if the versions match and reject or migrate the stored state.
As webpack tries to import content before passing them to the loader you cant specify the directory like you would be used in a normal loader.
Instead you should use the md5-loader
inline and specify the path
to the directory as a loader query-parameter.
As there is no actual file required the loader also does not get the context
in which it is running, thus you must specify the path to the directory absolute from the root of your project (where your node_modules live etc.).
var checksum = require('md5-loader?path=some/path/from/root/of/project!');
console.log(checksum);
// logs the md5-checksum of the above directory
FAQs
returns md5 hash of a specified path
The npm package @jimdo/md5-loader receives a total of 5 weekly downloads. As such, @jimdo/md5-loader popularity was classified as not popular.
We found that @jimdo/md5-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.