
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
An assortment of common HTML form elements, editable in-line the React way.
Try out the demo and see what it looks like.
npm install riek --save-dev
or
yarn add riek --dev
Use --save-dev
because you don't want to build and pack JS/CSS in production
Import the library:
import { RIEToggle, RIEInput, RIETextArea, RIENumber, RIETags, RIESelect } from 'riek'
import _ from 'lodash'
Suppose we want to be able to edit title of a Task
and send changes to server. Here is a Task
stored flat inside of our parent React component:
this.state = {
id: 1,
title: 'Cover with tests',
completed: false
}
Now we need a function which will send the single altered { key: value }
and upsert local state. You can implement it inside of your flux/redux/mobx store:
const httpTaskCallback = (task) => {
request.post(`/api/task/${this.state.id}`)
.send(task)
.end((err, res) => {
if (!err) return this.setState({ ...task })
// Handle HTTP error
})
}
Meanwhile, there is a simple Express handler on our API server:
app.use('/api/task/:id', async (req, res) => {
// req.body will equal to { title: 'A new title' }
const { id } = req.params
await Task.update({ ...req.body }).where({ id })
res.send('OK')
})
Finally, in our render
method, we add a minimal RIEInput
:
<RIEInput
value={this.state.text}
change={this.httpTaskCallback}
propName='title'
validate={_.isString} />
...repeat the last step, adding a Riek component for any object property we wish to edit.
Components come unstyled, so take a look at demo.jsx for examples.
style
.<RIESelect ... options={[
{id: '1', text: 'one'},
{id: '2', text: 'two'},
{id: '3', text: 'three'}
]} />
The build process does not work with Node v6 at the moment: use Node Version Manager, or just plain Node v5.6.0.
npm i
npm run build
to compile the lib and demoindex.html
and check if it workslocalStorage.debug = '*'
to see debug messages, add more if necessaryFAQs
React Inline Edit Kit
The npm package riek receives a total of 1,546 weekly downloads. As such, riek popularity was classified as popular.
We found that riek 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.