
Research
5 Malicious Chrome Extensions Enable Session Hijacking in Enterprise HR and ERP Systems
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.
validaty
Advanced tools
Validaty has basic validations for Rails application
Add this line to your application's Gemfile:
gem "validaty", "~> 0.0.3"
And then execute:
bundle install
Or install it yourself as:
bundle add validaty
Imagine this schema:
create_table "pixes", force: :cascade do |t|
t.uuid "public_id", null: false
t.integer "kind"
t.string "key", null: false
t.string "url", null: false
t.boolean "accepted", null: false, default: false
t.date "schedule_date", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
You should validate this way:
class Pix < ApplicationRecord
enum :kind, {cpf: 0, cnpj: 1, email: 2, phone: 3, evp: 4}
validates :public_id, uuid: true
validates :kind, presence: true
validates :key, cpf: true, if: :cpf?
validates :key, cnpj: true, if: :cnpj?
validates :key, email: true, if: :email?
validates :key, phone: {country_code: :phone_country}, if: :phone?
validates :key, uuid: true, if: :evp?
validates :accepted, boolean: true
validates :schedule_date, date: true
validates :url, presence: true, url: true
# OR
validates :url, presence: true, url: {domain: "domain.com"}
# OR
validates :url, presence: true, url: {starts_with: "https://domain.com/path"}
end
If you using url validation with options :domain or :starts_with, you must add in your locales:
pt-BR:
...
errors:
messages:
domain: "precisa ser do domínio %{domain}"
starts_with: "precisa começar com %{start}"
If you need use CPF or CNPJ validation you need add 2 acronym to config/initializers/inflections.rb
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "CPF"
inflect.acronym "CNPJ"
end
If you can't add inflections in your application, the suggestion is create an initializer config/initializers/validaty.rb with this content:
CnpjValidator = CNPJValidator
CpfValidator = CPFValidator
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/validaty.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that validaty 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
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.