id stringlengths 16 19 | source_dataset stringclasses 1
value | cwe stringclasses 25
values | cwe_id stringclasses 137
values | cwe_name stringclasses 1
value | language stringclasses 14
values | vulnerable_code stringlengths 38 5k | secure_code stringlengths 57 5k | severity stringclasses 1
value | cvss_score float64 0 10 | url stringlengths 74 107 | repository stringlengths 26 59 | commit_hash stringlengths 40 40 | timestamp stringdate 2009-05-11 00:00:00 2022-08-11 00:00:00 | metadata dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deltasecommits_0 | DeltaSecommits | CWE-200 | {'CWE-200'} | ts | }
/* eslint-enable camelcase */
/**
* @private
* @constructor
*
* @property {object} sharedWithDevices
* devices with which we have shared the session key
* userId -> {deviceId -> msgindex}
*/
class OutboundSessionInfo {
public useCount = 0;
public creationTime: number;
public sharedWithDe... | }
/* eslint-enable camelcase */
interface SharedWithData {
// The identity key of the device we shared with
deviceKey: string;
// The message index of the ratchet we shared with that device
messageIndex: number;
}
/**
* @private
* @constructor
*
* @property {object} sharedWithDevices
* devices... | 5.9 | https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9 | https://github.com/matrix-org/matrix-js-sdk | 894c24880da0e1cc81818f51c0db80e3c9fb2be9 | 2021-09-14 | {
"after_version": " interface IPayload extends Partial<IMessage> { } /* eslint-enable camelcase */ interface SharedWithData { // The identity key of the device we shared with deviceKey: string; // The message index of the ratchet we shared with that device messageIndex: number; } /** * @private *... | ||
deltasecommits_1 | DeltaSecommits | CWE-400 | {'CWE-400'} | js | { messages: [{ id: error.id, message: error.message, field: error.field }] },
];
/**
* A set of functions called "actions" for `Admin`
*/
try {
const { plugin } = ctx.request.body;
if (!/^[A-Za-z0-9_-]+$/.test(plugin)) {
return ctx.badRequest('Invalid plugin name');
}
try {
... | { messages: [{ id: error.id, message: error.message, field: error.field }] },
];
const PLUGIN_NAME_REGEX = /^[A-Za-z][A-Za-z0-9-_]+$/;
/**
* Validates a plugin name format
*/
const isValidPluginName = plugin => {
return (
_.isString(plugin) && !_.isEmpty(plugin) && PLUGIN_NAME_REGEX.test(plugin)
);
};
/*... | 4.9 | https://github.com/strapi/strapi/commit/c0c191c08f05fe10d7a6b1bf9475c1a651a89362 | https://github.com/strapi/strapi | c0c191c08f05fe10d7a6b1bf9475c1a651a89362 | 2021-12-10 | {
"after_version": " const formatError = error => [ { messages: [{ id: error.id, message: error.message, field: error.field }] }, ]; const PLUGIN_NAME_REGEX = /^[A-Za-z][A-Za-z0-9-_]+$/; /** * Validates a plugin name format */ const isValidPluginName = plugin => { return ( _.isString(plugin) && !_.isEmpty... | ||
deltasecommits_2 | DeltaSecommits | CWE-125 | {'CWE-125'} | cc | const Tensor& input_min_tensor = ctx->input(1);
const Tensor& input_max_tensor = ctx->input(2);
int num_slices = 1;
if (axis_ > -1) {
num_slices = input.dim_size(axis_); | const Tensor& input_min_tensor = ctx->input(1);
const Tensor& input_max_tensor = ctx->input(2);
OP_REQUIRES(
ctx, axis_ < input.dims(),
errors::InvalidArgument("Axis must be less than input dimension(",
input.dims(), "), got ", axis_));
int num_slices = ... | 8.1 | https://github.com/tensorflow/tensorflow/commit/23968a8bf65b009120c43b5ebcceaf52dbc9e943 | https://github.com/tensorflow/tensorflow | 23968a8bf65b009120c43b5ebcceaf52dbc9e943 | 2022-02-09 | {
"after_version": " class DequantizeOp : public OpKernel { const Tensor& input_min_tensor = ctx->input(1); const Tensor& input_max_tensor = ctx->input(2); OP_REQUIRES( ctx, axis_ < input.dims(), errors::InvalidArgument(\"Axis must be less than input dimension(\", ... | ||
deltasecommits_3 | DeltaSecommits | CWE-400 | {'CWE-400'} | cc | #include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/tensor.pb.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/lib/monitoring/counter.h"
return Status::OK();
... | #include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/tensor.pb.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/... | 7.5 | https://github.com/tensorflow/tensorflow/commit/448a16182065bd08a202d9057dd8ca541e67996c | https://github.com/tensorflow/tensorflow | 448a16182065bd08a202d9057dd8ca541e67996c | 2022-02-09 | {
"after_version": " limitations under the License. #include \"tensorflow/core/framework/attr_value.pb.h\" #include \"tensorflow/core/framework/function.pb.h\" #include \"tensorflow/core/framework/node_def.pb.h\" #include \"tensorflow/core/framework/op_def.pb.h\" #include \"tensorflow/core/framework/tensor.pb.h\" #in... | ||
deltasecommits_4 | DeltaSecommits | CWE-200 | {'CWE-178', 'CWE-200'} | php | throw new Error\NotFound('The URL wasn\'t found in the module.');
}
if (substr($path, -4) === '.php') {
// PHP file - attempt to run it
/* In some environments, $_SERVER['SCRIPT_NAME'] is already set with $_SERVER['PATH_INFO']. Check for that | throw new Error\NotFound('The URL wasn\'t found in the module.');
}
if (mb_strtolower(substr($path, -4), 'UTF-8') === '.php') {
// PHP file - attempt to run it
/* In some environments, $_SERVER['SCRIPT_NAME'] is already set with $_SERVER['PATH_INFO']. Check for that | 3 | https://github.com/simplesamlphp/simplesamlphp/commit/47968d26a2fd3ed52da70dc09210921d612ce44e | https://github.com/simplesamlphp/simplesamlphp | 47968d26a2fd3ed52da70dc09210921d612ce44e | 2020-04-22 | {
"after_version": " function ($val) { throw new Error\\NotFound('The URL wasn\\'t found in the module.'); } if (mb_strtolower(substr($path, -4), 'UTF-8') === '.php') { // PHP file - attempt to run it /* In some environments, $_SERVER['SCRIPT_NAME'] is already set... | ||
deltasecommits_5 | DeltaSecommits | CWE-416 | {'CWE-416'} | cc | if (width != static_cast<int64_t>(decode.width) || width <= 0 ||
width >= (1LL << 27) || height != static_cast<int64_t>(decode.height) ||
height <= 0 || height >= (1LL << 27) || total_size >= (1LL << 29)) {
png::CommonFreeDecode(&decode);
OP_REQUIRES(context, false,
err... | if (width != static_cast<int64_t>(decode.width) || width <= 0 ||
width >= (1LL << 27) || height != static_cast<int64_t>(decode.height) ||
height <= 0 || height >= (1LL << 27) || total_size >= (1LL << 29)) {
OP_REQUIRES(context, false,
errors::InvalidArgument("PNG size too lar... | 7.6 | https://github.com/tensorflow/tensorflow/commit/e746adbfcfee15e9cfdb391ff746c765b99bdf9b | https://github.com/tensorflow/tensorflow | e746adbfcfee15e9cfdb391ff746c765b99bdf9b | 2022-02-09 | {
"after_version": " class DecodeImageV2Op : public OpKernel { if (width != static_cast<int64_t>(decode.width) || width <= 0 || width >= (1LL << 27) || height != static_cast<int64_t>(decode.height) || height <= 0 || height >= (1LL << 27) || total_size >= (1LL << 29)) { OP_REQUIRES(context, f... | ||
deltasecommits_6 | DeltaSecommits | CWE-125 | {'CWE-125'} | cc | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
OpContext op_context(context, node);
switch (op_context.output->type) {
case kTfLiteFloat32:
TFLiteOperation<kernel_type, float, OpType>(context, node, op_context);
break;
case kTfLiteUInt8:
TFLiteOperation<kernel_t... | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
OpContext op_context(context, node);
// If inputs have no element, shortcircuit.
if (NumElements(op_context.input1) == 0 ||
NumElements(op_context.input2) == 0) {
return kTfLiteOk;
}
switch (op_context.output->type) {
case kTfLiteFl... | 2.5 | https://github.com/tensorflow/tensorflow/commit/953f28dca13c92839ba389c055587cfe6c723578 | https://github.com/tensorflow/tensorflow | 953f28dca13c92839ba389c055587cfe6c723578 | 2021-05-21 | {
"after_version": " template <KernelType kernel_type, typename OpType> TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { OpContext op_context(context, node); // If inputs have no element, shortcircuit. if (NumElements(op_context.input1) == 0 || NumElements(op_context.input2) == 0) { retu... | ||
deltasecommits_7 | DeltaSecommits | CWE-89 | {'CWE-89'} | js | path[path.length - 1] = $tmp[0];
}
$baseKey = self.quoteIdentifier(key)+'#>>\'{'+path.join(', ')+'}\'';
if (options.prefix) {
if (options.prefix instanceof Utils.literal) { | path[path.length - 1] = $tmp[0];
}
var pathKey = self.escape('{' + path.join(', ') + '}');
$baseKey = self.quoteIdentifier(key)+'#>>'+pathKey;
if (options.prefix) {
if (options.prefix instanceof Utils.literal) { | 9.8 | https://github.com/sequelize/sequelize/commit/ee4017379db0059566ecb5424274ad4e2d66bc68 | https://github.com/sequelize/sequelize | ee4017379db0059566ecb5424274ad4e2d66bc68 | 2019-11-08 | {
"after_version": " var QueryGenerator = { path[path.length - 1] = $tmp[0]; } var pathKey = self.escape('{' + path.join(', ') + '}'); $baseKey = self.quoteIdentifier(key)+'#>>'+pathKey; if (options.prefix) { if (options.prefix instanceof Utils.literal... | ||
deltasecommits_8 | DeltaSecommits | CWE-20 | {'CWE-20'} | cc | OP_REQUIRES_OK(ctx, ctx->input("key", &key_tensor));
OP_REQUIRES_OK(ctx, ctx->input("indices", &indices_tensor));
OP_REQUIRES_OK(ctx, ctx->input_list("values", &values_tensor));
// Create copy for insertion into Staging Area
Tensor key(*key_tensor); | OP_REQUIRES_OK(ctx, ctx->input("key", &key_tensor));
OP_REQUIRES_OK(ctx, ctx->input("indices", &indices_tensor));
OP_REQUIRES_OK(ctx, ctx->input_list("values", &values_tensor));
OP_REQUIRES(ctx, key_tensor->NumElements() > 0,
errors::InvalidArgument("key must not be empty"));
// Cre... | 5.5 | https://github.com/tensorflow/tensorflow/commit/d7de67733925de196ec8863a33445b73f9562d1d | https://github.com/tensorflow/tensorflow | d7de67733925de196ec8863a33445b73f9562d1d | 2021-08-25 | {
"after_version": " class MapStageOp : public OpKernel { OP_REQUIRES_OK(ctx, ctx->input(\"key\", &key_tensor)); OP_REQUIRES_OK(ctx, ctx->input(\"indices\", &indices_tensor)); OP_REQUIRES_OK(ctx, ctx->input_list(\"values\", &values_tensor)); OP_REQUIRES(ctx, key_tensor->NumElements() > 0, ... | ||
deltasecommits_9 | DeltaSecommits | CWE-369 | {'CWE-369'} | cc | //
// Input:
// Tensor[0]: Hash functions. Dim.size == 2, DataType: Float.
// Tensor[0].Dim[0]: Num of hash functions.
// Tensor[0].Dim[1]: Num of projected output bits generated by
// each hash function.
// In sparse case, Tensor[0].Dim[1] + ceil( log2(Tenso... | //
// Input:
// Tensor[0]: Hash functions. Dim.size == 2, DataType: Float.
// Tensor[0].Dim[0]: Num of hash functions. Must be at least 1.
// Tensor[0].Dim[1]: Num of projected output bits generated by
// each hash function.
// In sparse case, Tensor[0].Dim[1... | 5.5 | https://github.com/tensorflow/tensorflow/commit/0575b640091680cfb70f4dd93e70658de43b94f9 | https://github.com/tensorflow/tensorflow | 0575b640091680cfb70f4dd93e70658de43b94f9 | 2021-08-25 | {
"after_version": " limitations under the License. // // Input: // Tensor[0]: Hash functions. Dim.size == 2, DataType: Float. // Tensor[0].Dim[0]: Num of hash functions. Must be at least 1. // Tensor[0].Dim[1]: Num of projected output bits generated by // ea... | ||
deltasecommits_10 | DeltaSecommits | CWE-78 | {'CWE-78'} | ts |
import { platform } from "os";
import { exec } from "child_process";
export interface PingResult {
packetsTransmitted: number;
mdev: number;
}
export function ping(
host: string,
callback: (err: Error, res?: PingResult, stdout?: string) => void
): void {
let cmd: string, parseRegExp1: RegExp, parseRegExp2:... |
import { platform } from "os";
import { exec } from "child_process";
import { domainToASCII } from "url";
export interface PingResult {
packetsTransmitted: number;
mdev: number;
}
function isValidHost(host: string): boolean {
// Valid chars in IPv4, IPv6, domain names
if (/^[a-zA-Z0-9\-.:[\]-]+$/.test(host))... | 9.8 | https://github.com/genieacs/genieacs/commit/7f295beeecc1c1f14308a93c82413bb334045af6 | https://github.com/genieacs/genieacs | 7f295beeecc1c1f14308a93c82413bb334045af6 | 2022-03-07 | {
"after_version": " import { platform } from \"os\"; import { exec } from \"child_process\"; import { domainToASCII } from \"url\"; export interface PingResult { packetsTransmitted: number; export interface PingResult { mdev: number; } function isValidHost(host: string): boolean { // Valid chars in IPv4, IP... | ||
deltasecommits_11 | DeltaSecommits | CWE-400 | {'CWE-400'} | js | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g,
reTrimStart = /^\s+/,
reTrimEnd = /\s+$/;
/** Used to match wrap detail comments. */
var reWrapComment = /\{(?:\n\/\* \[... | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/** Used to match wrap detail comments. */
var reWrapComment = /... | 5.3 | https://github.com/lodash/lodash/pull/5065/commits/02906b8191d3c100c193fe6f7b27d1c40f200bb7 | https://github.com/lodash/lodash | 02906b8191d3c100c193fe6f7b27d1c40f200bb7 | 2022-01-06 | {
"after_version": " var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); /** Used to match leading whitespace. */ var reTrimStart = /^\\s+/; /** Used to match a single whitespace character. */ var reWhitespace = /\\s/; /** Used to match wrap detail comments... | ||
deltasecommits_12 | DeltaSecommits | CWE-190 | {'CWE-190'} | cc | #include <utility>
#include <vector>
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/resource_mgr.h"
#include "tensorflow/co... | #include <utility>
#include <vector>
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/resource_mgr.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_util.h"
#include "tensorflow/core/fram... | 2.5 | https://github.com/tensorflow/tensorflow/commit/69c68ecbb24dff3fa0e46da0d16c821a2dd22d7c | https://github.com/tensorflow/tensorflow | 69c68ecbb24dff3fa0e46da0d16c821a2dd22d7c | 2021-05-21 | {
"after_version": " limitations under the License. #include <utility> #include <vector> #include \"tensorflow/core/framework/op_kernel.h\" #include \"tensorflow/core/framework/register_types.h\" #include \"tensorflow/core/framework/resource_mgr.h\" #include \"tensorflow/core/framework/tensor.h\" #include \"tensorfl... | ||
deltasecommits_13 | DeltaSecommits | CWE-79 | {'CWE-79'} | php | }
}
return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag'=> e($request->input('asset_tag'))], 'Asset with tag '.$request->input('asset_tag').' not found')); | }
}
return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag'=> e($request->input('asset_tag'))], 'Asset with tag '.e($request->input('asset_tag')).' not found')); | 3.9 | https://github.com/snipe/snipe-it/commit/9ed1442bd124710f4178992cc4eca5236c7396b9 | https://github.com/snipe/snipe-it | 9ed1442bd124710f4178992cc4eca5236c7396b9 | 2021-11-15 | {
"after_version": " public function audit(Request $request) { } } return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag'=> e($request->input('asset_tag'))], 'Asset with tag '.e($request->input('asset_tag')).' not found')); ",
"author": "snipe",
"dataset_sou... | ||
deltasecommits_14 | DeltaSecommits | CWE-787 | {'CWE-787'} | cc |
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/kernels/reshape_op.h"
void Compute(OpKernelContext* ctx) override {
// This call proces... |
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/kernels/reshape_op.h"
void Compute(OpKe... | 2.5 | https://github.com/tensorflow/tensorflow/commit/a324ac84e573fba362a5e53d4e74d5de6729933e | https://github.com/tensorflow/tensorflow | a324ac84e573fba362a5e53d4e74d5de6729933e | 2021-05-21 | {
"after_version": " limitations under the License. #include \"tensorflow/core/framework/op_kernel.h\" #include \"tensorflow/core/framework/register_types.h\" #include \"tensorflow/core/framework/tensor_shape.h\" #include \"tensorflow/core/framework/tensor_types.h\" #include \"tensorflow/core/framework/types.h\" #in... | ||
deltasecommits_15 | DeltaSecommits | CWE-79 | {'CWE-79'} | php | return [
'severity' => $this->severityLabel($level),
'timestamp' => $displayTime,
'source' => $device ? Url::deviceLink($device) : $message['message']['source'],
'message' => $message['message']['message'] ?? '',
'facility' => is_numeric($facili... | return [
'severity' => $this->severityLabel($level),
'timestamp' => $displayTime,
'source' => $device ? Url::deviceLink($device) : htmlspecialchars($message['message']['source']),
'message' => htmlspecialchars($message['message']['message'] ?? ''),
... | 6.1 | https://github.com/librenms/librenms/commit/cc6112b8fb36039b862b42d86eb79ef7ee89d31b | https://github.com/librenms/librenms | cc6112b8fb36039b862b42d86eb79ef7ee89d31b | 2022-06-03 | {
"after_version": " private function formatMessage($message) return [ 'severity' => $this->severityLabel($level), 'timestamp' => $displayTime, 'source' => $device ? Url::deviceLink($device) : htmlspecialchars($message['message']['source']), 'message' => h... | ||
deltasecommits_16 | DeltaSecommits | CWE-20 | {'CWE-918', 'CWE-20'} | java | Document doc = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
javax.xml.parsers.DocumentBuilder parser = factory
.newDocumentBuilder();
parser.setErrorHandler(new ErrorHandler() {
public void error(SA... | Document doc = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
... | 8.2 | https://github.com/apache/xmlgraphics-batik/commit/0ef5b661a1f77772d1110877ea9e0287987098f6 | https://github.com/apache/xmlgraphics-batik | 0ef5b661a1f77772d1110877ea9e0287987098f6 | 2022-01-06 | {
"after_version": " private Element parseXml(String xmlString) { Document doc = null; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { factory.setFeature(\"http://xml.org/sax/features/external-general-entities\", false); factory.setFeature(\... | ||
deltasecommits_17 | DeltaSecommits | CWE-352 | {'CWE-352'} | rb | module Spina
class ApplicationController < ActionController::Base
include ApplicationHelper
private | module Spina
class ApplicationController < ActionController::Base
protect_from_forgery
include ApplicationHelper
private | 8.8 | https://github.com/denkGroot/Spina/commit/bfe44f289e336f80b6593032679300c493735e75 | https://github.com/denkGroot/Spina | bfe44f289e336f80b6593032679300c493735e75 | 2018-08-28 | {
"after_version": " module Spina class ApplicationController < ActionController::Base protect_from_forgery include ApplicationHelper private",
"author": "Bram Jetten",
"dataset_source": "rufimelo/DeltaSecommits",
"file_path": "app/controllers/spina/application_controller.rb",
"message": "... | ||
deltasecommits_18 | DeltaSecommits | CWE-89 | {'CWE-89'} | php | use Product;
use Shop;
use Symfony\Component\Translation\TranslatorInterface;
use WishList;
/**
if ('products' === $type) {
$sortOrder = $query->getSortOrder()->toLegacyOrderBy(true);
$querySearch->orderBy($sortOrder . ' ' . $query->getSortOrder()->toLegacyOrderWay());
$que... | use Product;
use Shop;
use Symfony\Component\Translation\TranslatorInterface;
use Validate;
use WishList;
/**
if ('products' === $type) {
$sortOrder = $query->getSortOrder()->toLegacyOrderBy(true);
$sortWay = $query->getSortOrder()->toLegacyOrderWay();
if (Validate::isOrder... | 8.1 | https://github.com/PrestaShop/blockwishlist/commit/b3ec4b85af5fd73f74d55390b226d221298ca084 | https://github.com/PrestaShop/blockwishlist | b3ec4b85af5fd73f74d55390b226d221298ca084 | 2022-06-25 | {
"after_version": " use Product; use Shop; use Symfony\\Component\\Translation\\TranslatorInterface; use Validate; use WishList; /** private function getProductsOrCount( if ('products' === $type) { $sortOrder = $query->getSortOrder()->toLegacyOrderBy(true); $sortWay = $query->getSor... | ||
deltasecommits_19 | DeltaSecommits | CWE-20 | {'CWE-20'} | cc | errors::InvalidArgument("tag must be scalar"));
const Tensor& tensor = c->input(1);
const Tensor& serialized_summary_metadata_tensor = c->input(2);
Summary s;
Summary::Value* v = s.add_value(); | errors::InvalidArgument("tag must be scalar"));
const Tensor& tensor = c->input(1);
const Tensor& serialized_summary_metadata_tensor = c->input(2);
OP_REQUIRES(
c,
TensorShapeUtils::IsScalar(serialized_summary_metadata_tensor.shape()),
errors::InvalidArgument("seriali... | 5.5 | https://github.com/tensorflow/tensorflow/commit/290bb05c80c327ed74fae1d089f1001b1e2a4ef7 | https://github.com/tensorflow/tensorflow | 290bb05c80c327ed74fae1d089f1001b1e2a4ef7 | 2022-05-24 | {
"after_version": " class SummaryTensorOpV2 : public OpKernel { errors::InvalidArgument(\"tag must be scalar\")); const Tensor& tensor = c->input(1); const Tensor& serialized_summary_metadata_tensor = c->input(2); OP_REQUIRES( c, TensorShapeUtils::IsScalar(serialized_summa... | ||
deltasecommits_20 | DeltaSecommits | CWE-125 | {'CWE-125'} | cc | OP_REQUIRES(
c, TensorShapeUtils::IsVectorOrHigher(params.shape()),
errors::InvalidArgument("params must be at least 1 dimensional"));
// Check that we have enough index space
const int64_t N = indices.NumElements(); | OP_REQUIRES(
c, TensorShapeUtils::IsVectorOrHigher(params.shape()),
errors::InvalidArgument("params must be at least 1 dimensional"));
OP_REQUIRES(
c, params.shape().dims() >= batch_dims_,
errors::InvalidArgument("params must have at least ", batch_dims_,
... | 7.3 | https://github.com/tensorflow/tensorflow/commit/bc9c546ce7015c57c2f15c168b3d9201de679a1d | https://github.com/tensorflow/tensorflow | bc9c546ce7015c57c2f15c168b3d9201de679a1d | 2021-08-25 | {
"after_version": " class ResourceGatherOp : public OpKernel { OP_REQUIRES( c, TensorShapeUtils::IsVectorOrHigher(params.shape()), errors::InvalidArgument(\"params must be at least 1 dimensional\")); OP_REQUIRES( c, params.shape().dims() >= batch_dims_, errors::InvalidArgument... | ||
deltasecommits_21 | DeltaSecommits | CWE-79 | {'CWE-79'} | py | if not text:
return ""
pattern = fr'([\[\s\S\]]*?)\(([\s\S]*?):([\[\s\S\]]*?)\)'
# Regex check
if re.match(pattern, text):
# get get value of group regex | if not text:
return ""
pattern = fr'([\[\s\S\]]*?)\(([\s\S]*?):([\s\S]*?)\)'
# Regex check
if re.match(pattern, text):
# get get value of group regex | 8.8 | https://github.com/django-helpdesk/django-helpdesk/commit/a22eb0673fe0b7784f99c6b5fd343b64a6700f06 | https://github.com/django-helpdesk/django-helpdesk | a22eb0673fe0b7784f99c6b5fd343b64a6700f06 | 2021-12-03 | {
"after_version": " def get_markdown(text): if not text: return \"\" pattern = fr'([\\[\\s\\S\\]]*?)\\(([\\s\\S]*?):([\\s\\S]*?)\\)' # Regex check if re.match(pattern, text): # get get value of group regex",
"author": "noobpk",
"dataset_source": "rufimelo/DeltaSecommits",
"file... | ||
deltasecommits_22 | DeltaSecommits | CWE-89 | {'CWE-89'} | php | } elseif ($filterField == 'id') {
$conditionPartsFilters[] = 'oo_id ' . $operator . ' ' . $db->quote($filter['value']);
} else {
if ($filter['type'] == 'date' && $operator == '=') {
//... | } elseif ($filterField == 'id') {
$conditionPartsFilters[] = 'oo_id ' . $operator . ' ' . $db->quote($filter['value']);
} else {
$filterField = $db->quoteIdentifier('o_' . $filterField);
i... | 7.5 | https://github.com/pimcore/pimcore/commit/523a735ab94f004459b84ffdfd3db784586bbd82 | https://github.com/pimcore/pimcore | 523a735ab94f004459b84ffdfd3db784586bbd82 | 2022-04-23 | {
"after_version": " public function getFilterCondition($filterJson, ClassDefinition $class, $tablePr } elseif ($filterField == 'id') { $conditionPartsFilters[] = 'oo_id ' . $operator . ' ' . $db->quote($filter['value']); } else { ... | ||
deltasecommits_23 | DeltaSecommits | CWE-22 | {'CWE-22'} | cs | name = name.Replace('/', Path.DirectorySeparatorChar);
string destFile = Path.Combine(destDir, name);
if (!allowParentTraversal && !Path.GetFullPath(destFile).StartsWith(destDir, StringComparison.InvariantCultureIgnoreCase))
{
throw new InvalidNameException("Parent traversal in paths is not allowed");... | name = name.Replace('/', Path.DirectorySeparatorChar);
string destFile = Path.Combine(destDir, name);
var destFileDir = Path.GetDirectoryName(Path.GetFullPath(destFile)) ?? "";
if (!allowParentTraversal && !destFileDir.StartsWith(destDir, StringComparison.InvariantCultureIgnoreCase))
{
throw new In... | 4 | https://github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78 | https://github.com/icsharpcode/SharpZipLib | 5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78 | 2022-02-01 | {
"after_version": " private void ExtractEntry(string destDir, TarEntry entry, bool allowParentTraver \t\t\tname = name.Replace('/', Path.DirectorySeparatorChar); \t\t\tstring destFile = Path.Combine(destDir, name); \t\t\tvar destFileDir = Path.GetDirectoryName(Path.GetFullPath(destFile)) ?? \"\"; \t\t\tif (!allowP... | ||
deltasecommits_24 | DeltaSecommits | CWE-79 | {'CWE-79'} | php | $report = new ElggReportedContent();
$report->owner_guid = elgg_get_logged_in_user_guid();
$report->title = $title;
$report->address = $address;
$report->description = $description;
$report->access_id = $access; | $report = new ElggReportedContent();
$report->owner_guid = elgg_get_logged_in_user_guid();
$report->title = $title;
$report->address = elgg_normalize_site_url($address);
$report->description = $description;
$report->access_id = $access; | 5.4 | https://github.com/elgg/elgg/commit/c30b17bf75256ed3fcc84e2083147cc3951423d0 | https://github.com/elgg/elgg | c30b17bf75256ed3fcc84e2083147cc3951423d0 | 2022-01-06 | {
"after_version": " $report = new ElggReportedContent(); $report->owner_guid = elgg_get_logged_in_user_guid(); $report->title = $title; $report->address = elgg_normalize_site_url($address); $report->description = $description; $report->access_id = $access; ",
"author": "Jerôme Bakker",
"dataset_source": "rufimel... | ||
deltasecommits_25 | DeltaSecommits | CWE-79 | {'CWE-79'} | php | 'registered_on',
true
);
// add the mass action controls
$this->dgProfiles->setMassActionCheckboxes('check', '[id]'); | 'registered_on',
true
);
$this->dgProfiles->setColumnFunction('htmlspecialchars', ['[display_name]'], 'display_name');
// add the mass action controls
$this->dgProfiles->setMassActionCheckboxes('check', '[id]'); | 5.4 | https://github.com/forkcms/forkcms/commit/6ec6171206a7507a39695edc8bbd1b97ef1041c6 | https://github.com/forkcms/forkcms | 6ec6171206a7507a39695edc8bbd1b97ef1041c6 | 2021-10-25 | {
"after_version": " private function loadDataGrid(): void 'registered_on', true ); $this->dgProfiles->setColumnFunction('htmlspecialchars', ['[display_name]'], 'display_name'); // add the mass action controls $this->dgProfiles->setMassActionCheckboxes('check',... | ||
deltasecommits_26 | DeltaSecommits | CWE-400 | {'CWE-400'} | js | reply_to_object: replyToObject,
print: print,
err_code: /^([A-Z]+)\s+(.+)$/,
monitor_regex: /^[0-9]{10,11}\.[0-9]+ \[[0-9]+ .+\]( ".+?")+$/,
clone: convenienceClone,
callback_or_emit: callbackOrEmit,
reply_in_order: replyInOrder | reply_to_object: replyToObject,
print: print,
err_code: /^([A-Z]+)\s+(.+)$/,
monitor_regex: /^[0-9]{10,11}\.[0-9]+ \[[0-9]+ .+\].*"$/,
clone: convenienceClone,
callback_or_emit: callbackOrEmit,
reply_in_order: replyInOrder | 7.5 | https://github.com/NodeRedis/node-redis/commit/2d11b6dc9b9774464a91fb4b448bad8bf699629e | https://github.com/NodeRedis/node-redis | 2d11b6dc9b9774464a91fb4b448bad8bf699629e | 2021-04-27 | {
"after_version": " module.exports = { reply_to_object: replyToObject, print: print, err_code: /^([A-Z]+)\\s+(.+)$/, monitor_regex: /^[0-9]{10,11}\\.[0-9]+ \\[[0-9]+ .+\\].*\"$/, clone: convenienceClone, callback_or_emit: callbackOrEmit, reply_in_order: replyInOrder",
"author": "Leibale... | ||
deltasecommits_27 | DeltaSecommits | CWE-94 | {'CWE-74', 'CWE-94'} | java | /*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.C... | /*
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.securi... | 9.8 | https://github.com/spring-projects/spring-framework/commit/002546b3e4b8d791ea6acccb81eb3168f51abb15 | https://github.com/spring-projects/spring-framework | 002546b3e4b8d791ea6acccb81eb3168f51abb15 | 2022-03-31 | {
"after_version": " /* * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the \"License\"); * you may not use this file except in compliance with the License. import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.lang.reflect.Mod... | ||
deltasecommits_28 | DeltaSecommits | CWE-125 | {'CWE-125'} | cc | for (int64_t i = 0; i < indices_mat.dimension(0); ++i) {
const int64_t batch = indices_mat(i, 0);
const Tidx bin = values(i);
if (bin < size) {
if (binary_output_) {
out(batch, bin) = T(1); | for (int64_t i = 0; i < indices_mat.dimension(0); ++i) {
const int64_t batch = indices_mat(i, 0);
const Tidx bin = values(i);
OP_REQUIRES(
ctx, batch < out.dimension(0),
errors::InvalidArgument("Index out of bound. `batch` (", batch,
... | 7.1 | https://github.com/tensorflow/tensorflow/commit/f410212e373eb2aec4c9e60bf3702eba99a38aba | https://github.com/tensorflow/tensorflow | f410212e373eb2aec4c9e60bf3702eba99a38aba | 2021-11-10 | {
"after_version": " class SparseBincountOp : public OpKernel { for (int64_t i = 0; i < indices_mat.dimension(0); ++i) { const int64_t batch = indices_mat(i, 0); const Tidx bin = values(i); OP_REQUIRES( ctx, batch < out.dimension(0), errors::InvalidArgument(\"Inde... | ||
deltasecommits_29 | DeltaSecommits | CWE-200 | {'CWE-200'} | js | this.server = https.createServer(await getCertificate(options.https));
}
this.wss = new WebSocket.Server({server: this.server});
this.server.listen(options.hmrPort, resolve);
}); | this.server = https.createServer(await getCertificate(options.https));
}
let websocketOptions = {
server: this.server
};
if (options.hmrHostname) {
websocketOptions.origin = `${options.https ? 'https' : 'http'}://${
options.hmrHostname
}`;
}
... | 7.5 | https://github.com/parcel-bundler/parcel/commit/066e0bf6bd26b15c78bd47df023452e4b20073e4 | https://github.com/parcel-bundler/parcel | 066e0bf6bd26b15c78bd47df023452e4b20073e4 | 2018-10-30 | {
"after_version": " class HMRServer { this.server = https.createServer(await getCertificate(options.https)); } let websocketOptions = { server: this.server }; if (options.hmrHostname) { websocketOptions.origin = `${options.https ? 'https' : 'http'}://${ opt... | ||
deltasecommits_30 | DeltaSecommits | CWE-22 | {'CWE-22'} | php | <?php
/**
* This class is responsible for providing operations to an object for managing the object's manipulation
*
* @copyright The ImpressCMS Project http://www.impresscms.org/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @category ICMS
* @packag... | <?php
/**
* This class is responsible for providing operations to an object for managing the object's manipulation
*
* @copyright The ImpressCMS Project http://www.impresscms.org/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
* @category ICMS
* @package Ipf
... | 9.8 | https://github.com/ImpressCMS/impresscms/commit/a66d7bb499faafab803e24833606028fa0ba4261 | https://github.com/ImpressCMS/impresscms | a66d7bb499faafab803e24833606028fa0ba4261 | 2022-02-15 | {
"after_version": " <?php /** * This class is responsible for providing operations to an object for managing the object's manipulation * * @copyright\tThe ImpressCMS Project http://www.impresscms.org/ * @license\t\thttp://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @catego... | ||
deltasecommits_31 | DeltaSecommits | CWE-79 | {'CWE-79'} | php | $redirectUrl = str_replace("\r", "", $redirectUrl);
$redirectUrl = str_replace("\n", "", $redirectUrl);
if (headers_sent()) {
echo '<meta http-equiv="refresh" content="0;url=' . $redirectUrl . '">';
} else { | $redirectUrl = str_replace("\r", "", $redirectUrl);
$redirectUrl = str_replace("\n", "", $redirectUrl);
$clearInput = new HTMLClean();
$redirectUrl = $clearInput->clean($redirectUrl);
if (headers_sent()) {
echo '<meta http-equiv="refresh" content="0;url=' . $redirec... | 6.5 | https://github.com/microweber/microweber/commit/2b8fa5aac31e51e2aca83c7ef5d1281ba2e755f8 | https://github.com/microweber/microweber | 2b8fa5aac31e51e2aca83c7ef5d1281ba2e755f8 | 2022-02-20 | {
"after_version": " public function redirect($url) $redirectUrl = str_replace(\"\\r\", \"\", $redirectUrl); $redirectUrl = str_replace(\"\\n\", \"\", $redirectUrl); $clearInput = new HTMLClean(); $redirectUrl = $clearInput->clean($redirectUrl); if (headers_sent()) { ... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 30