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()) { ...
deltasecommits_32
DeltaSecommits
CWE-400
{'CWE-400'}
js
// Presto based /(opera\smini)\/([\w\.-]+)/i, // Opera Mini /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet /(opera).+version\/([\w\.]+)/i, // Opera > 9.80 ...
// Presto based /(opera\smini)\/([\w\.-]+)/i, // Opera Mini /(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet /(opera).+version\/([\w\.]+)/i, // Opera > 9.80 ...
7.5
https://github.com/faisalman/ua-parser-js/commit/6d1f26df051ba681463ef109d36c9cf0f7e32b18
https://github.com/faisalman/ua-parser-js
6d1f26df051ba681463ef109d36c9cf0f7e32b18
2022-02-09
{ "after_version": " // Presto based /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini /(opera\\s[mobiletab]{3,6}).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet /(opera).+version\\/([\\w\\.]+)/i, ...
deltasecommits_33
DeltaSecommits
CWE-400
{'CWE-400'}
js
* s = Audio file format, primarily a WAV file */ const entryPattern = /^(.)(.*?)\t(.*?)\t(.*?)\t(.*?)\u000d\u000a$/ const entry = dirent.match(entryPattern) if (entry === null) {
* s = Audio file format, primarily a WAV file */ const entryPattern = /^(.)([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\r\n$/ const entry = dirent.match(entryPattern) if (entry === null) {
7.5
https://github.com/locutusjs/locutus/commit/eb863321990e7e5514aa14f68b8d9978ece9e65e
https://github.com/locutusjs/locutus
eb863321990e7e5514aa14f68b8d9978ece9e65e
2021-06-10
{ "after_version": " module.exports = function gopher_parsedir (dirent) { // eslint-disable-line came * s = Audio file format, primarily a WAV file */ const entryPattern = /^(.)([^\\t]*)\\t([^\\t]*)\\t([^\\t]*)\\t([^\\t]*)\\r\\n$/ const entry = dirent.match(entryPattern) if (entry === null) {", "autho...
deltasecommits_34
DeltaSecommits
CWE-362
{'CWE-362'}
rs
} } fn fired(&mut self) { *self.mutex.lock().unwrap() = true; self.cond.notify_one(); } fn wait(&mut self) { let mut fired = self.mutex.lock().unwrap(); while !*fired { fired = self.cond.wait(fired).unwrap(); #[cfg(feature = "unlock_notify")] unsafe ...
} } fn fired(&self) { let mut flag = self.mutex.lock().unwrap(); *flag = true; self.cond.notify_one(); } fn wait(&self) { let mut fired = self.mutex.lock().unwrap(); while !*fired { fired = self.cond.wait(fired).unwrap(); #[cfg(feature = "unl...
9.8
https://github.com/rusqlite/rusqlite/commit/45fd77ee43c38eea4d6f4e2e56c1667a55ec654f
https://github.com/rusqlite/rusqlite
45fd77ee43c38eea4d6f4e2e56c1667a55ec654f
2021-08-25
{ "after_version": " impl UnlockNotification { } } fn fired(&self) { let mut flag = self.mutex.lock().unwrap(); *flag = true; self.cond.notify_one(); } fn wait(&self) { let mut fired = self.mutex.lock().unwrap(); while !*fired { fired = sel...
deltasecommits_35
DeltaSecommits
CWE-287
{'CWE-287'}
go
handleErrs(http.StatusBadRequest, err) return } resp := struct { tc.Alerts }{}
handleErrs(http.StatusBadRequest, err) return } if form.Username == "" || form.Password == "" { api.HandleErr(w, r, nil, http.StatusBadRequest, errors.New("username and password are required"), nil) return } resp := struct { tc.Alerts }{}
9.8
https://github.com/apache/trafficcontrol/commit/f780aff77a52d52a37b4d1cc3e8e801c0b557356
https://github.com/apache/trafficcontrol
f780aff77a52d52a37b4d1cc3e8e801c0b557356
2021-05-18
{ "after_version": " func LoginHandler(db *sqlx.DB, cfg config.Config) http.HandlerFunc { \t\t\thandleErrs(http.StatusBadRequest, err) \t\t\treturn \t\t} \t\tif form.Username == \"\" || form.Password == \"\" { \t\t\tapi.HandleErr(w, r, nil, http.StatusBadRequest, errors.New(\"username and password are required\"), ni...
deltasecommits_36
DeltaSecommits
CWE-120
{'CWE-787', 'CWE-120'}
cc
for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank) { return errors::InvalidArgument("perm dim ", in_idx, " is out of range of input rank ", rank); }
for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank || in_idx <= -rank) { return errors::InvalidArgument("perm dim ", in_idx, " is out of range of input rank ", rank); }
5.5
https://github.com/tensorflow/tensorflow/commit/c79ba87153ee343401dbe9d1954d7f79e521eb14
https://github.com/tensorflow/tensorflow
c79ba87153ee343401dbe9d1954d7f79e521eb14
2021-11-10
{ "after_version": " Status TransposeShapeFn(InferenceContext* c) { for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank || in_idx <= -rank) { return errors::InvalidArgument(\"perm dim \", in_idx, \" is out of range of input ...
deltasecommits_37
DeltaSecommits
CWE-787
{'CWE-787', 'CWE-120'}
cc
for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank) { return errors::InvalidArgument("perm dim ", in_idx, " is out of range of input rank ", rank); }
for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank || in_idx <= -rank) { return errors::InvalidArgument("perm dim ", in_idx, " is out of range of input rank ", rank); }
5.5
https://github.com/tensorflow/tensorflow/commit/c79ba87153ee343401dbe9d1954d7f79e521eb14
https://github.com/tensorflow/tensorflow
c79ba87153ee343401dbe9d1954d7f79e521eb14
2021-11-10
{ "after_version": " Status TransposeShapeFn(InferenceContext* c) { for (int32_t i = 0; i < rank; ++i) { int64_t in_idx = data[i]; if (in_idx >= rank || in_idx <= -rank) { return errors::InvalidArgument(\"perm dim \", in_idx, \" is out of range of input ...
deltasecommits_38
DeltaSecommits
CWE-125
{'CWE-125'}
cc
void Compute(OpKernelContext* ctx) override { const Tensor& input = ctx->input(0); const float input_min_float = ctx->input(1).flat<float>()(0); const float input_max_float = ctx->input(2).flat<float>()(0); Tensor* output_min = nullptr;
void Compute(OpKernelContext* ctx) override { const Tensor& input = ctx->input(0); OP_REQUIRES(ctx, ctx->input(1).NumElements() > 0, errors::InvalidArgument("Input min must not be empty.")); OP_REQUIRES(ctx, ctx->input(2).NumElements() > 0, errors::InvalidArgument("Input m...
2.5
https://github.com/tensorflow/tensorflow/commit/ef0c008ee84bad91ec6725ddc42091e19a30cf0e
https://github.com/tensorflow/tensorflow
ef0c008ee84bad91ec6725ddc42091e19a30cf0e
2021-05-21
{ "after_version": " class RequantizationRangeOp : public OpKernel { void Compute(OpKernelContext* ctx) override { const Tensor& input = ctx->input(0); OP_REQUIRES(ctx, ctx->input(1).NumElements() > 0, errors::InvalidArgument(\"Input min must not be empty.\")); OP_REQUIRES(ctx, ctx->inp...
deltasecommits_39
DeltaSecommits
CWE-94
{'CWE-94'}
js
// inherited from Object.prototype. For example, if obj has a custom // toString() method, don't overwrite it with the toString() method // that props inherited from Object.prototype if((tobj[x] === undefined || tobj[x] != props[x]) && props[x] !== undefined && obj != props[x]){ if(dojo.isObject(obj[x]...
// inherited from Object.prototype. For example, if obj has a custom // toString() method, don't overwrite it with the toString() method // that props inherited from Object.prototype if(x !== '__proto__ ' && ((tobj[x] === undefined || tobj[x] != props[x])) && props[x] !== undefined && obj != props[x]){ ...
7.7
https://github.com/dojo/dojox/commit/47d1b302b5b23d94e875b77b9b9a8c4f5622c9da
https://github.com/dojo/dojox
47d1b302b5b23d94e875b77b9b9a8c4f5622c9da
2020-03-10
{ "after_version": " dojo.query differences that cause some tests to fail: \t\t\t// inherited from Object.prototype. For example, if obj has a custom \t\t\t// toString() method, don't overwrite it with the toString() method \t\t\t// that props inherited from Object.prototype \t\t\tif(x !== '__proto__ ' && ((tobj[x] ...
deltasecommits_40
DeltaSecommits
CWE-416
{'CWE-416'}
cc
TF_RETURN_IF_ERROR(outer_context->MakeShapeFromShapeProto(proto, &handle)); outer_context->set_output(index, handle); auto* resource = node_context->input_handle_shapes_and_types(0); if (resource) { outer_context->set_output_handle_shapes_and_types(index, *resource); } }
TF_RETURN_IF_ERROR(outer_context->MakeShapeFromShapeProto(proto, &handle)); outer_context->set_output(index, handle); const std::vector<ShapeAndType>* resource = node_context->input_handle_shapes_and_types(0); if (resource) { // `ShapesAndType`s contain `ShapeHandle`s. These `ShapeHandle...
6.6
https://github.com/tensorflow/tensorflow/commit/ee119d4a498979525046fba1c3dd3f13a039fbb1
https://github.com/tensorflow/tensorflow
ee119d4a498979525046fba1c3dd3f13a039fbb1
2021-08-25
{ "after_version": " Status ShapeRefiner::InferShapesForFunctionSubNode( TF_RETURN_IF_ERROR(outer_context->MakeShapeFromShapeProto(proto, &handle)); outer_context->set_output(index, handle); const std::vector<ShapeAndType>* resource = node_context->input_handle_shapes_and_types(0); if (resour...
deltasecommits_41
DeltaSecommits
CWE-79
{'CWE-79'}
php
class ApiController extends FrontendController { public function api_html() { if (!defined('MW_API_HTML_OUTPUT')) { $request_data = array_merge($_GET, $_POST); // sanitize attributes if($request_data){ $request_data_new = []; $antixss = new AntiXSS...
class ApiController extends FrontendController { public function api_html() { if (!defined('MW_API_HTML_OUTPUT')) { $request_data = array_merge($_GET, $_POST); // sanitize attributes if($request_data){ $request_data_new = []; $antixss = new AntiXSS(); ...
5.4
https://github.com/microweber/microweber/commit/fc7e1a026735b93f0e0047700d08c44954fce9ce
https://github.com/microweber/microweber
fc7e1a026735b93f0e0047700d08c44954fce9ce
2022-01-28
{ "after_version": " class ApiController extends FrontendController { public function api_html() { if (!defined('MW_API_HTML_OUTPUT')) { public function module() $request_data = array_merge($_GET, $_POST); // sanitize attributes if($request_data){ $request_data_...
deltasecommits_42
DeltaSecommits
CWE-476
{'CWE-476'}
cc
// See docs in ../ops/nn_ops.cc. #define EIGEN_USE_THREADS #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" : MaxPoolingOp<Device, T>(context) {} void Compute(OpKernelContext* context) override { const float min_input = context->input(1).flat<float>()(0); const float max_input = context-...
// See docs in ../ops/nn_ops.cc. #include "tensorflow/core/framework/op_requires.h" #include "tensorflow/core/platform/errors.h" #define EIGEN_USE_THREADS #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" : MaxPoolingOp<Device, T>(context) {} void Compute(OpKernelContext* context) override { ...
6.5
https://github.com/tensorflow/tensorflow/commit/53b0dd6dc5957652f35964af16b892ec9af4a559
https://github.com/tensorflow/tensorflow
53b0dd6dc5957652f35964af16b892ec9af4a559
2022-02-09
{ "after_version": " limitations under the License. // See docs in ../ops/nn_ops.cc. #include \"tensorflow/core/framework/op_requires.h\" #include \"tensorflow/core/platform/errors.h\" #define EIGEN_USE_THREADS #include \"third_party/eigen3/unsupported/Eigen/CXX11/Tensor\" class QuantizedMaxPoolingOp : public MaxP...
deltasecommits_43
DeltaSecommits
CWE-79
{'CWE-79'}
php
} //上传文件,返回url public function upload($_files , $file_key , $uid , $item_id = 0 , $page_id = 0 ){ $uploadFile = $_files[$file_key] ; if( !$this->isAllowedFilename($_files[$file_key]['name']) ){ return false; } public function isAllowedFilename($filename){ $allow_array = array( '.jpg','.jpeg','.pn...
} //上传文件,返回url public function upload($_files , $file_key , $uid , $item_id = 0 , $page_id = 0 , $check_filename = true ){ $uploadFile = $_files[$file_key] ; if( $check_filename && !$this->isAllowedFilename($_files[$file_key]['name']) ){ return false; } public function isAllowedFilename($filename){ ...
6.9
https://github.com/star7th/showdoc/commit/3caa32334db0c277b84e993eaca2036f5d1dbef8
https://github.com/star7th/showdoc
3caa32334db0c277b84e993eaca2036f5d1dbef8
2022-03-16
{ "after_version": " public function deleteFile($file_id){ \t} \t//上传文件,返回url \tpublic function upload($_files , $file_key , $uid , $item_id = 0 , $page_id = 0 , $check_filename = true ){ \t\t$uploadFile = $_files[$file_key] ; \t\tif( $check_filename && !$this->isAllowedFilename($_files[$file_key]['name']) ){ \t\...
deltasecommits_44
DeltaSecommits
CWE-79
{'CWE-79'}
php
'xqt', // SuperCalc Macro File', 'xys', // XYplorer Script File', 'zl9', // ZoneAlarm Quarantined EXE File 'swf', // Flash File );
'xqt', // SuperCalc Macro File', 'xys', // XYplorer Script File', 'zl9', // ZoneAlarm Quarantined EXE File 'swf', // Flash File 'key', 'asax', 'btapp', 'xd', 'fwtemplate',...
4.8
https://github.com/microweber/microweber/commit/89200cfcc2cfefe5554721e7fa3cf52f6a2a9120
https://github.com/microweber/microweber
89200cfcc2cfefe5554721e7fa3cf52f6a2a9120
2022-03-13
{ "after_version": " function get_dangerous_files_extentions() 'xqt', // SuperCalc Macro File', 'xys', // XYplorer Script File', 'zl9', // ZoneAlarm Quarantined EXE File 'swf', // Flash File 'key', 'asax',...
deltasecommits_45
DeltaSecommits
CWE-400
{'CWE-400'}
py
email_regex = re.compile( r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@]+(?:\.[^@]+)*)" r"$", re.IGNORECASE, )
email_regex = re.compile( r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@\.]+(?:\.[^@\.]+)*)" r"$", re.IGNORECASE, )
7.5
https://github.com/python-restx/flask-restx/commit/bab31e085f355dd73858fd3715f7ed71849656da
https://github.com/python-restx/flask-restx
bab31e085f355dd73858fd3715f7ed71849656da
2021-09-08
{ "after_version": " def my_type(value): email_regex = re.compile( r\"^\" \"(?P<local>[^@]*[^@.])\" r\"@\" r\"(?P<server>[^@\\.]+(?:\\.[^@\\.]+)*)\" r\"$\", re.IGNORECASE, ) ", "author": "ziirish", "dataset_source": "rufimelo/DeltaSecommits", "file_path": "flask_restx/inputs.py", "message": "optimiz...
deltasecommits_46
DeltaSecommits
CWE-369
{'CWE-369'}
cc
// Only one scale factor per batch is typically necessary. See optimized // implementation for why we need to allocate for the height of the inputs // flattened to 2D. const int height = NumElements(input) / channels_in; int scaling_dims[1] = {height}; if (!TfLiteIntArrayEqualsArray(scaling_fact...
// Only one scale factor per batch is typically necessary. See optimized // implementation for why we need to allocate for the height of the inputs // flattened to 2D. TF_LITE_ENSURE(context, channels_in != 0); const int height = NumElements(input) / channels_in; int scaling_dims[1] = {height}; ...
2.5
https://github.com/tensorflow/tensorflow/commit/ff489d95a9006be080ad14feb378f2b4dac35552
https://github.com/tensorflow/tensorflow
ff489d95a9006be080ad14feb378f2b4dac35552
2021-05-21
{ "after_version": " TfLiteStatus Prepare(KernelType kernel_type, TfLiteContext* context, // Only one scale factor per batch is typically necessary. See optimized // implementation for why we need to allocate for the height of the inputs // flattened to 2D. TF_LITE_ENSURE(context, channels_in != 0); ...
deltasecommits_47
DeltaSecommits
CWE-79
{'CWE-79'}
js
*/ function setStageHeadline(title) { if (getUtility().isUndefinedOrNull(title)) { title = buildTitleByFormElement(); } $(getHelper().getDomElementDataIdentifierSelector('stageHeadline')).html(title); }; /** getHelper() .getTemplatePropertyDomElement('_type', ...
*/ function setStageHeadline(title) { if (getUtility().isUndefinedOrNull(title)) { title = buildTitleByFormElement().text(); } $(getHelper().getDomElementDataIdentifierSelector('stageHeadline')).text(title); }; /** getHelper() .getTemplatePropertyDomElement('_...
5.4
https://github.com/TYPO3/typo3/commit/6f2554dc4ea0b670fd5599c54fd788d4db96c4a0
https://github.com/TYPO3/typo3
6f2554dc4ea0b670fd5599c54fd788d4db96c4a0
2022-06-17
{ "after_version": " function factory($, Helper, Icons) { */ function setStageHeadline(title) { if (getUtility().isUndefinedOrNull(title)) { title = buildTitleByFormElement().text(); } $(getHelper().getDomElementDataIdentifierSelector('stageHeadline')).text(title); }; /** ...
deltasecommits_48
DeltaSecommits
CWE-22
{'CWE-22'}
js
var target = pth.resolve(targetPath, maintainEntryPath ? entryName : pth.basename(entryName)); if (item.isDirectory) { target = pth.resolve(target, ".."); _zip.entries.forEach(function(entry) { entryName = entry.entryName.toString(); ...
var target = pth.resolve(targetPath, maintainEntryPath ? entryName : pth.basename(entryName)); if(!target.startsWith(targetPath)) { throw Utils.Errors.INVALID_FILENAME + ": " + entryName; } if (item.isDirectory) { target = pth.resolve(ta...
0
https://github.com/cthackers/adm-zip/commit/62f64004fefb894c523a7143e8a88ebe6c84df25
https://github.com/cthackers/adm-zip
62f64004fefb894c523a7143e8a88ebe6c84df25
2018-07-27
{ "after_version": " module.exports = function(/*String*/input) { var target = pth.resolve(targetPath, maintainEntryPath ? entryName : pth.basename(entryName)); if(!target.startsWith(targetPath)) { throw Utils.Errors.INVALID_FILENAME + \": \" + entryName; } ...
deltasecommits_49
DeltaSecommits
CWE-369
{'CWE-369'}
cc
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, kOutputTensor, &output)); switch (indices->type) { case kTfLiteInt32: return EvalGatherNd<int32_t>(context, params, indices, output);
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, kOutputTensor, &output)); // Prevent division by 0 in the helper TF_LITE_ENSURE(context, NumElements(params) > 0); switch (indices->type) { case kTfLiteInt32: return EvalGatherNd<int32_t>(context, params, indices, output);
2.5
https://github.com/tensorflow/tensorflow/commit/8e45822aa0b9f5df4b4c64f221e64dc930a70a9d
https://github.com/tensorflow/tensorflow
8e45822aa0b9f5df4b4c64f221e64dc930a70a9d
2021-05-21
{ "after_version": " TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, kOutputTensor, &output)); // Prevent division by 0 in the helper TF_LITE_ENSURE(context, NumElements(params) > 0); switch (indices->type) { case ...
deltasecommits_50
DeltaSecommits
CWE-78
{'CWE-78'}
java
@Override public Response processControlCommand(ControlCommand command) throws Exception { String control = command.getCommand(); if (control != null && control.equals("shutdown")) { System.exit(0); } return null; }
@Override public Response processControlCommand(ControlCommand command) throws Exception { return null; }
7.5
https://github.com/apache/activemq/commit/00921f22ff9a8792d7663ef8fadd4823402a6324
https://github.com/apache/activemq
00921f22ff9a8792d7663ef8fadd4823402a6324
2022-05-14
{ "after_version": " public int getProtocolVersion() { @Override public Response processControlCommand(ControlCommand command) throws Exception { return null; } ", "author": "Timothy Bish", "dataset_source": "rufimelo/DeltaSecommits", "file_path": "activemq-broker/src/main/java/org/apache/a...
deltasecommits_51
DeltaSecommits
CWE-78
{'CWE-77', 'CWE-78'}
js
function gitClone () { // --depth implies --single-branch const flag = depth < Infinity ? '--depth=' + depth : '--single-branch' const args = ['clone', flag, url, outPath] debug('git ' + args.join(' ')) spawn('git', args, {}, function (err) { if (err) err.message += ' (git clone) (' + url + ...
function gitClone () { // --depth implies --single-branch const flag = depth < Infinity ? '--depth=' + depth : '--single-branch' const args = ['clone', flag, '--', url, outPath] debug('git ' + args.join(' ')) spawn('git', args, {}, function (err) { if (err) err.message += ' (git clone) (' + ...
9.8
https://github.com/feross/git-pull-or-clone/commit/f9ce092be13cc32e685dfa26e7705e9c6e3108a3
https://github.com/feross/git-pull-or-clone
f9ce092be13cc32e685dfa26e7705e9c6e3108a3
2022-05-03
{ "after_version": " function gitPullOrClone (url, outPath, opts, cb) { function gitClone () { // --depth implies --single-branch const flag = depth < Infinity ? '--depth=' + depth : '--single-branch' const args = ['clone', flag, '--', url, outPath] debug('git ' + args.join(' ')) spawn('git', ar...
deltasecommits_52
DeltaSecommits
CWE-79
{'CWE-79'}
php
if (isset($_GET['autosize'])) { $autoSize = $_GET['autosize']; } $type = ''; if (isset($_GET['type'])) { $type = $_GET['type']; } $mod_id = $mod_orig_id = false; $is_linked_mod = false; if (mw.notification) { mw.notification.success('<?ph...
if (isset($_GET['autosize'])) { $autoSize = $_GET['autosize']; } $autoSize = xss_clean($autoSize); $type = ''; if (isset($_GET['type'])) { $type = $_GET['type']; } $type = xss_clean($type); $mod_id = $mod_orig_id = false; $is_linked_mod = false; if (...
6.1
https://github.com/microweber/microweber/commit/c51285f791e48e536111cd57a9544ccbf7f33961
https://github.com/microweber/microweber
c51285f791e48e536111cd57a9544ccbf7f33961
2022-06-23
{ "after_version": " if (isset($_GET['autosize'])) { $autoSize = $_GET['autosize']; } $autoSize = xss_clean($autoSize); $type = ''; if (isset($_GET['type'])) { $type = $_GET['type']; } $type = xss_clean($type); $mod_id = $mod_orig_id = false; $is_linked_mod = fals...
deltasecommits_53
DeltaSecommits
CWE-120
{'CWE-787', 'CWE-120'}
cc
int num_values = values.size(); int batch_idx = 0; Tensor* out_t; OP_REQUIRES_OK( ctx, ctx->allocate_output(0, TensorShape({num_rows, size}), &out_t));
int num_values = values.size(); int batch_idx = 0; OP_REQUIRES(ctx, splits(0) == 0, errors::InvalidArgument("Splits must start with 0, not with ", splits(0))); OP_REQUIRES(ctx, splits(num_rows) == num_values, errors::InvalidArgume...
2.5
https://github.com/tensorflow/tensorflow/commit/eebb96c2830d48597d055d247c0e9aebaea94cd5
https://github.com/tensorflow/tensorflow
eebb96c2830d48597d055d247c0e9aebaea94cd5
2021-05-21
{ "after_version": " class RaggedBincountOp : public OpKernel { int num_values = values.size(); int batch_idx = 0; OP_REQUIRES(ctx, splits(0) == 0, errors::InvalidArgument(\"Splits must start with 0, not with \", splits(0))); OP_REQUIRES(ctx, s...
deltasecommits_54
DeltaSecommits
CWE-787
{'CWE-787', 'CWE-120'}
cc
int num_values = values.size(); int batch_idx = 0; Tensor* out_t; OP_REQUIRES_OK( ctx, ctx->allocate_output(0, TensorShape({num_rows, size}), &out_t));
int num_values = values.size(); int batch_idx = 0; OP_REQUIRES(ctx, splits(0) == 0, errors::InvalidArgument("Splits must start with 0, not with ", splits(0))); OP_REQUIRES(ctx, splits(num_rows) == num_values, errors::InvalidArgume...
2.5
https://github.com/tensorflow/tensorflow/commit/eebb96c2830d48597d055d247c0e9aebaea94cd5
https://github.com/tensorflow/tensorflow
eebb96c2830d48597d055d247c0e9aebaea94cd5
2021-05-21
{ "after_version": " class RaggedBincountOp : public OpKernel { int num_values = values.size(); int batch_idx = 0; OP_REQUIRES(ctx, splits(0) == 0, errors::InvalidArgument(\"Splits must start with 0, not with \", splits(0))); OP_REQUIRES(ctx, s...
deltasecommits_55
DeltaSecommits
CWE-369
{'CWE-369'}
cc
TF_LITE_ENSURE_EQ(context, NumDimensions(input), 4); TF_LITE_ENSURE_EQ(context, NumDimensions(filter), 4); const TfLiteType data_type = input->type;
TF_LITE_ENSURE_EQ(context, NumDimensions(input), 4); TF_LITE_ENSURE_EQ(context, NumDimensions(filter), 4); TF_LITE_ENSURE(context, params->dilation_height_factor > 0); TF_LITE_ENSURE(context, params->dilation_width_factor > 0); const TfLiteType data_type = input->type;
6.5
https://github.com/tensorflow/tensorflow/commit/e5b0eec199c2d03de54fd6a7fd9275692218e2bc
https://github.com/tensorflow/tensorflow
e5b0eec199c2d03de54fd6a7fd9275692218e2bc
2022-02-09
{ "after_version": " TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumDimensions(input), 4); TF_LITE_ENSURE_EQ(context, NumDimensions(filter), 4); TF_LITE_ENSURE(context, params->dilation_height_factor > 0); TF_LITE_ENSURE(context, params->dilation_width_factor >...
deltasecommits_56
DeltaSecommits
CWE-352
{'CWE-352'}
js
}); app.get('/comments/get/:id/:pagination?', middleware.applyCSRF, Comments.getCommentData); app.post('/comments/reply', Comments.replyToComment); app.post('/comments/publish', Comments.publishArticle); app.get('/admin/blog-comments', middleware.admin.buildHeader, renderAdmin); app.get('/api/admin/blog-c...
}); app.get('/comments/get/:id/:pagination?', middleware.applyCSRF, Comments.getCommentData); app.post('/comments/reply', middleware.applyCSRF, Comments.replyToComment); app.post('/comments/publish', middleware.applyCSRF, Comments.publishArticle); app.get('/admin/blog-comments', middleware.admin.buildHeader...
6.8
https://github.com/psychobunny/nodebb-plugin-blog-comments/commit/cf43beedb05131937ef46f365ab0a0c6fa6ac618
https://github.com/psychobunny/nodebb-plugin-blog-comments
cf43beedb05131937ef46f365ab0a0c6fa6ac618
2020-08-26
{ "after_version": " \t\t}); \t\tapp.get('/comments/get/:id/:pagination?', middleware.applyCSRF, Comments.getCommentData); \t\tapp.post('/comments/reply', middleware.applyCSRF, Comments.replyToComment); \t\tapp.post('/comments/publish', middleware.applyCSRF, Comments.publishArticle); \t\tapp.get('/admin/blog-commen...
deltasecommits_57
DeltaSecommits
CWE-78
{'CWE-78'}
js
const D = require('os').platform().substring(0, 3).toLowerCase() === 'win' ? '"' : '\''; const CMD_CONVERT = { gm: 'gm', im: 'convert', magick: 'magick' }; const CMD_CONVERT2 = { gm: 'gm convert', im: 'convert', magick: 'magick' }; var CACHE = {}; var middlewares = {}; !self.builder.length && self.minify(); if (!t...
const D = require('os').platform().substring(0, 3).toLowerCase() === 'win' ? '"' : '\''; const CMD_CONVERT = { gm: 'gm', im: 'convert', magick: 'magick' }; const CMD_CONVERT2 = { gm: 'gm convert', im: 'convert', magick: 'magick' }; const SUPPORTEDIMAGES = { jpg: 1, png: 1, gif: 1, apng: 1, jpeg: 1, heif: 1, heic: 1, we...
8.6
https://github.com/totaljs/framework/commit/6192491ab2631e7c1d317c221f18ea613e2c18a5
https://github.com/totaljs/framework
6192491ab2631e7c1d317c221f18ea613e2c18a5
2021-02-05
{ "after_version": " const SPAWN_OPT = { shell: true }; const D = require('os').platform().substring(0, 3).toLowerCase() === 'win' ? '\"' : '\\''; const CMD_CONVERT = { gm: 'gm', im: 'convert', magick: 'magick' }; const CMD_CONVERT2 = { gm: 'gm convert', im: 'convert', magick: 'magick' }; const SUPPORTEDIMAGES = { jp...
deltasecommits_58
DeltaSecommits
CWE-476
{'CWE-476'}
cc
#include "tensorflow/python/lib/core/ndarray_tensor.h" #include <cstring> #include "tensorflow/c/eager/tfe_context_internal.h" #include "tensorflow/c/tf_tensor_internal.h" PyObject* key; PyObject* value; Py_ssize_t pos = 0; if (PyDict_Next(descr->fields, &pos, &key, &value)) { // In Python 3, the keys of ...
#include "tensorflow/python/lib/core/ndarray_tensor.h" #include <cstring> #include <optional> #include "tensorflow/c/eager/tfe_context_internal.h" #include "tensorflow/c/tf_tensor_internal.h" PyObject* key; PyObject* value; Py_ssize_t pos = 0; // Return an error if the fields attribute is null. // Occurs w...
2.5
https://github.com/tensorflow/tensorflow/commit/030af767d357d1b4088c4a25c72cb3906abac489
https://github.com/tensorflow/tensorflow
030af767d357d1b4088c4a25c72cb3906abac489
2021-05-21
{ "after_version": " limitations under the License. #include \"tensorflow/python/lib/core/ndarray_tensor.h\" #include <cstring> #include <optional> #include \"tensorflow/c/eager/tfe_context_internal.h\" #include \"tensorflow/c/tf_tensor_internal.h\" Status PyArrayDescr_to_TF_DataType(PyArray_Descr* descr, PyObjec...
deltasecommits_59
DeltaSecommits
CWE-79
{'CWE-79'}
php
{ // RULES /** * @Route("/rule/list", name="pimcore_admin_targeting_rulelist", methods={"GET"}) * foreach ($list->load() as $target) { $targets[] = [ 'id' => $target->getId(), 'text' => $target->getName(), 'active' => $target->getAct...
{ // RULES private function correctName(string $name): string { return preg_replace('/[#?*:\\\\<>|"%&@=;+]/', '-', $name); } /** * @Route("/rule/list", name="pimcore_admin_targeting_rulelist", methods={"GET"}) * foreach ($list->load() as $target) { $targets[] ...
5.4
https://github.com/pimcore/pimcore/commit/665976327ad3c2c87efa2a5a64d696032c0a8109
https://github.com/pimcore/pimcore
665976327ad3c2c87efa2a5a64d696032c0a8109
2022-01-26
{ "after_version": " class TargetingController extends AdminController implements KernelControllerEve { // RULES private function correctName(string $name): string { return preg_replace('/[#?*:\\\\\\\\<>|\"%&@=;+]/', '-', $name); } /** * @Route(\"/rule/list\", name=\"pimcore_admin_t...
deltasecommits_60
DeltaSecommits
CWE-94
{'CWE-94'}
php
// return null if no caching // return value if in caching $keyword = self::PREFIX . $item->getKey(); $x = isset($_COOKIE[ $keyword ]) ? $this->decode(json_decode($_COOKIE[ $keyword ], true)) : false; if ($x == false) { return null;
// return null if no caching // return value if in caching $keyword = self::PREFIX . $item->getKey(); $x = isset($_COOKIE[ $keyword ]) ? json_decode($_COOKIE[ $keyword ], true) : false; if ($x == false) { return null;
4.4
https://github.com/PHPSocialNetwork/phpfastcache/commit/c4527205cb7a402b595790c74310791f5b04a1a4
https://github.com/PHPSocialNetwork/phpfastcache
c4527205cb7a402b595790c74310791f5b04a1a4
2019-12-12
{ "after_version": " protected function driverRead(CacheItemInterface $item) // return null if no caching // return value if in caching $keyword = self::PREFIX . $item->getKey(); $x = isset($_COOKIE[ $keyword ]) ? json_decode($_COOKIE[ $keyword ], true) : false; if ($x == fals...
deltasecommits_61
DeltaSecommits
CWE-787
{'CWE-787', 'CWE-125', 'CWE-590'}
rs
let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. // // Because GC safepoints are technically only associated with a single // PC, we should ideally only care about `Ok(index)` values returned // from the binary se...
let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. let index = match info .stack_maps .binary_search_by_key(&func_offset, |i| i.code_offset) { // Found it. Ok(i) => i, //...
6.3
https://github.com/bytecodealliance/wasmtime/commit/398a73f0dd862dbe703212ebae8e34036a18c11c
https://github.com/bytecodealliance/wasmtime
398a73f0dd862dbe703212ebae8e34036a18c11c
2021-09-20
{ "after_version": " impl ModuleInfo for RegisteredModule { let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. let index = match info .stack_maps .binary_search_by_key(&func_offset, |i| i.code_offset) { ...
deltasecommits_62
DeltaSecommits
CWE-125
{'CWE-787', 'CWE-125', 'CWE-590'}
rs
let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. // // Because GC safepoints are technically only associated with a single // PC, we should ideally only care about `Ok(index)` values returned // from the binary se...
let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. let index = match info .stack_maps .binary_search_by_key(&func_offset, |i| i.code_offset) { // Found it. Ok(i) => i, //...
6.3
https://github.com/bytecodealliance/wasmtime/commit/398a73f0dd862dbe703212ebae8e34036a18c11c
https://github.com/bytecodealliance/wasmtime
398a73f0dd862dbe703212ebae8e34036a18c11c
2021-09-20
{ "after_version": " impl ModuleInfo for RegisteredModule { let info = self.module.func_info(index); // Do a binary search to find the stack map for the given offset. let index = match info .stack_maps .binary_search_by_key(&func_offset, |i| i.code_offset) { ...
deltasecommits_63
DeltaSecommits
CWE-79
{'CWE-87', 'CWE-79', 'CWE-75'}
ts
font: ['color', 'face', 'size'], form: [ 'accept', 'action', 'autocomplete', 'enctype', 'method',
font: ['color', 'face', 'size'], form: [ 'accept', 'autocomplete', 'enctype', 'method',
7.4
https://github.com/jupyterlab/jupyterlab/commit/504825938c0abfa2fb8ff8d529308830a5ae42ed
https://github.com/jupyterlab/jupyterlab
504825938c0abfa2fb8ff8d529308830a5ae42ed
2021-08-23
{ "after_version": " export class Sanitizer implements ISanitizer { font: ['color', 'face', 'size'], form: [ 'accept', 'autocomplete', 'enctype', 'method',", "author": "Steven Silvester", "dataset_source": "rufimelo/DeltaSecommits", "file_path": "packages/apputils/src...
deltasecommits_64
DeltaSecommits
CWE-94
{'CWE-94'}
java
*******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList;...
*******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.*; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Random; import java.util.regex.Pattern; /** private boolean exractAnd...
0
https://github.com/fusesource/hawtjni/commit/92c266170ce98edc200c656bd034a237098b8aa5
https://github.com/fusesource/hawtjni
92c266170ce98edc200c656bd034a237098b8aa5
2022-05-17
{ "after_version": " *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.*; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Random; import java.util.regex.Pattern; /** final ...
deltasecommits_65
DeltaSecommits
CWE-79
{'CWE-79'}
py
SUPPORTED_METHODS = ('GET',) @web.authenticated def get(self, format, path): class NbconvertPostHandler(IPythonHandler): SUPPORTED_METHODS = ('POST',) @web.authenticated def post(self, format): exporter = get_exporter(format, config=self.config)
SUPPORTED_METHODS = ('GET',) @property def content_security_policy(self): # In case we're serving HTML/SVG, confine any Javascript to a unique # origin so it can't interact with the notebook server. return super(NbconvertFileHandler, self).content_security_policy + \ ...
6.1
https://github.com/jupyter/notebook/commit/107a89fce5f413fb5728c1c5d2c7788e1fb17491
https://github.com/jupyter/notebook
107a89fce5f413fb5728c1c5d2c7788e1fb17491
2018-11-21
{ "after_version": " class NbconvertFileHandler(IPythonHandler): SUPPORTED_METHODS = ('GET',) @property def content_security_policy(self): # In case we're serving HTML/SVG, confine any Javascript to a unique # origin so it can't interact with the notebook server. return super(Nbc...
deltasecommits_66
DeltaSecommits
CWE-125
{'CWE-125', 'CWE-824'}
cc
#include "tensorflow/core/kernels/fill_functor.h" #include "tensorflow/core/lib/core/blocking_counter.h" #include "tensorflow/core/lib/core/threadpool.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/mutex.h" errors::Invalid...
#include "tensorflow/core/kernels/fill_functor.h" #include "tensorflow/core/lib/core/blocking_counter.h" #include "tensorflow/core/lib/core/threadpool.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/plat...
7.8
https://github.com/tensorflow/tensorflow/commit/e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
https://github.com/tensorflow/tensorflow
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
2021-11-10
{ "after_version": " limitations under the License. #include \"tensorflow/core/kernels/fill_functor.h\" #include \"tensorflow/core/lib/core/blocking_counter.h\" #include \"tensorflow/core/lib/core/threadpool.h\" #include \"tensorflow/core/platform/errors.h\" #include \"tensorflow/core/platform/logging.h\" #include \"...
deltasecommits_67
DeltaSecommits
CWE-79
{'CWE-79'}
js
htmlFilter.addRules( createBogusAndFillerRules( editor, 'html' ), { applyToAll: true } ); editor.on( 'toHtml', function( evt ) { var evtData = evt.data, data = evtData.dataValue, fixBodyTag; // Before we start protecting markup, make sure there are no externally injected // protection keywords. ...
htmlFilter.addRules( createBogusAndFillerRules( editor, 'html' ), { applyToAll: true } ); editor.on( 'toHtml', function( evt ) { var randomNumber = generateRandomNumber(), evtData = evt.data, data = evtData.dataValue, fixBodyTag; // Before we start protecting markup, make sure there are no exter...
5.4
https://github.com/ckeditor/ckeditor4/commit/d158413449692d920a778503502dcb22881bc949
https://github.com/ckeditor/ckeditor4
d158413449692d920a778503502dcb22881bc949
2022-03-16
{ "after_version": " \t\thtmlFilter.addRules( createBogusAndFillerRules( editor, 'html' ), { applyToAll: true } ); \t\teditor.on( 'toHtml', function( evt ) { \t\t\tvar randomNumber = generateRandomNumber(), \t\t\t\tevtData = evt.data, \t\t\t\tdata = evtData.dataValue, \t\t\t\tfixBodyTag; \t\t\t// Before we start pr...
deltasecommits_68
DeltaSecommits
CWE-125
{'CWE-125'}
cc
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const float input_min = context->input(1).flat<float>()(0); const float input_max = context->input(2).flat<float>()(0); const Tensor& mean = context->input(3); const float mean_min = context->input(4).flat<...
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const auto& input_min_tensor = context->input(1); OP_REQUIRES(context, input_min_tensor.NumElements() == 1, errors::InvalidArgument("input_min must have 1 element")); const float input_min = inp...
2.5
https://github.com/tensorflow/tensorflow/commit/d6ed5bcfe1dcab9e85a4d39931bd18d99018e75b
https://github.com/tensorflow/tensorflow
d6ed5bcfe1dcab9e85a4d39931bd18d99018e75b
2021-05-21
{ "after_version": " class QuantizedBatchNormOp : public OpKernel { void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const auto& input_min_tensor = context->input(1); OP_REQUIRES(context, input_min_tensor.NumElements() == 1, errors::InvalidArgum...
deltasecommits_69
DeltaSecommits
CWE-78
{'CWE-78'}
ts
export default async function generateDevCert (commonName: string) { if (!commandExists.sync('openssl')) throw new Error('Unable to find openssl - make sure it is installed and available in your PATH'); if (!commonName.match(/^(.|\.){1,64}$/)) throw new Error(`Invalid Common Name ${commonName}.`); try { ...
export default async function generateDevCert (commonName: string) { if (!commandExists.sync('openssl')) throw new Error('Unable to find openssl - make sure it is installed and available in your PATH'); if (!commonName.match(/^(a-zA-Z0-9|\.){1,64}$/)) throw new Error(`Invalid Common Name ${commonName}.`); ...
9.8
https://github.com/guybedford/devcert/commit/571f4e6d077f7f21c6aed655ae380d85a7a5d3b8
https://github.com/guybedford/devcert
571f4e6d077f7f21c6aed655ae380d85a7a5d3b8
2020-04-14
{ "after_version": " import fs = require('fs'); export default async function generateDevCert (commonName: string) { if (!commandExists.sync('openssl')) throw new Error('Unable to find openssl - make sure it is installed and available in your PATH'); if (!commonName.match(/^(a-zA-Z0-9|\\.){1,64}$/)) throw...
deltasecommits_70
DeltaSecommits
CWE-400
{'CWE-400'}
js
var kw = keywords[word] return ret(kw.type, kw.style, word) } if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false)) return ret("async", "keyword", word) } return ret("variable", "variable", word)
var kw = keywords[word] return ret(kw.type, kw.style, word) } if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) return ret("async", "keyword", word) } return ret("variable", "variable", word)
5.3
https://github.com/codemirror/CodeMirror/commit/55d0333907117c9231ffdf555ae8824705993bbb
https://github.com/codemirror/CodeMirror
55d0333907117c9231ffdf555ae8824705993bbb
2021-05-10
{ "after_version": " CodeMirror.defineMode(\"javascript\", function(config, parserConfig) { var kw = keywords[word] return ret(kw.type, kw.style, word) } if (word == \"async\" && stream.match(/^(\\s|\\/\\*([^*]|\\*(?!\\/))*?\\*\\/)*[\\[\\(\\w]/, false)) return ret(\"async...
deltasecommits_71
DeltaSecommits
CWE-20
{'CWE-325', 'CWE-200', 'CWE-502', 'CWE-20'}
php
call_user_func(function() { $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('value'); $addition = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('addition'); $scope = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('scope'); $content = \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($value, $addition); ...
call_user_func(function() { $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('value'); $scope = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('scope'); if (!is_string($value) || empty($value)) { \TYPO3\CMS\Core\Utility\HttpUtility::setResponseCodeAndExit( \TYPO3\CMS\Core\Utility\Ht...
9.8
https://github.com/FriendsOfTYPO3/mediace/commit/fa29ffd3e8b275782a8600d2406e1b1e5e16ae75
https://github.com/FriendsOfTYPO3/mediace
fa29ffd3e8b275782a8600d2406e1b1e5e16ae75
2020-07-29
{ "after_version": " call_user_func(function() { $value = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GET('value'); $scope = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GET('scope'); if (!is_string($value) || empty($value)) { \\TYPO3\\CMS\\Core\\Utility\\HttpUtility::setResponseCodeAndExit( ...
deltasecommits_72
DeltaSecommits
CWE-200
{'CWE-325', 'CWE-200', 'CWE-502', 'CWE-20'}
php
call_user_func(function() { $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('value'); $addition = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('addition'); $scope = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('scope'); $content = \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($value, $addition); ...
call_user_func(function() { $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('value'); $scope = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('scope'); if (!is_string($value) || empty($value)) { \TYPO3\CMS\Core\Utility\HttpUtility::setResponseCodeAndExit( \TYPO3\CMS\Core\Utility\Ht...
9.8
https://github.com/FriendsOfTYPO3/mediace/commit/fa29ffd3e8b275782a8600d2406e1b1e5e16ae75
https://github.com/FriendsOfTYPO3/mediace
fa29ffd3e8b275782a8600d2406e1b1e5e16ae75
2020-07-29
{ "after_version": " call_user_func(function() { $value = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GET('value'); $scope = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GET('scope'); if (!is_string($value) || empty($value)) { \\TYPO3\\CMS\\Core\\Utility\\HttpUtility::setResponseCodeAndExit( ...
deltasecommits_73
DeltaSecommits
CWE-125
{'CWE-787', 'CWE-125'}
cc
block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { int orig_dim = traversal_order_[original_rank + block_dim]; block_size_[block_dim] = dense_size[orig_dim]; blocked_shape_[i] = dense_shape_[i] / d...
block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { if (original_rank + block_dim < traversal_order_.size()) { int orig_dim = traversal_order_[original_rank + block_dim]; block_size_[block_dim] ...
8.8
https://github.com/tensorflow/tensorflow/commit/6364463d6f5b6254cac3d6aedf999b6a96225038
https://github.com/tensorflow/tensorflow
6364463d6f5b6254cac3d6aedf999b6a96225038
2022-02-09
{ "after_version": " void FormatConverter<T>::InitSparseToDenseConverter( block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { if (original_rank + block_dim < traversal_order_.size()) { int orig_dim = ...
deltasecommits_74
DeltaSecommits
CWE-787
{'CWE-787', 'CWE-125'}
cc
block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { int orig_dim = traversal_order_[original_rank + block_dim]; block_size_[block_dim] = dense_size[orig_dim]; blocked_shape_[i] = dense_shape_[i] / d...
block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { if (original_rank + block_dim < traversal_order_.size()) { int orig_dim = traversal_order_[original_rank + block_dim]; block_size_[block_dim] ...
8.8
https://github.com/tensorflow/tensorflow/commit/6364463d6f5b6254cac3d6aedf999b6a96225038
https://github.com/tensorflow/tensorflow
6364463d6f5b6254cac3d6aedf999b6a96225038
2022-02-09
{ "after_version": " void FormatConverter<T>::InitSparseToDenseConverter( block_size_.resize(block_map_.size()); for (int i = 0; i < original_rank; i++) { if (block_dim < block_map_.size() && block_map_[block_dim] == i) { if (original_rank + block_dim < traversal_order_.size()) { int orig_dim = ...
deltasecommits_75
DeltaSecommits
CWE-79
{'CWE-79'}
rb
elsif !query.include?(hashtag) query += " #{hashtag}" end out << link_to_function(tag, "crm.search_tagged('#{query}', '#{model.class.to_s.tableize}')", title: tag) end end
elsif !query.include?(hashtag) query += " #{hashtag}" end out << link_to_function(tag, "crm.search_tagged('#{escape_javascript(query)}', '#{model.class.to_s.tableize}')", title: tag) end end
6.1
https://github.com/fatfreecrm/fat_free_crm/commit/6d60bc8ed010c4eda05d6645c64849f415f68d65
https://github.com/fatfreecrm/fat_free_crm
6d60bc8ed010c4eda05d6645c64849f415f68d65
2019-08-21
{ "after_version": " def tags_for_index(model) elsif !query.include?(hashtag) query += \" #{hashtag}\" end out << link_to_function(tag, \"crm.search_tagged('#{escape_javascript(query)}', '#{model.class.to_s.tableize}')\", title: tag) end end ", "author": "Antonin Steinhauser", "dat...
deltasecommits_76
DeltaSecommits
CWE-94
{'CWE-94'}
php
use Facade\IgnitionContracts\RunnableSolution; use Illuminate\Support\Facades\Blade; class MakeViewVariableOptionalSolution implements RunnableSolution { } } public function makeOptional(array $parameters = []) { $originalContents = file_get_contents($parameters['viewFile']); $new...
use Facade\IgnitionContracts\RunnableSolution; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Str; class MakeViewVariableOptionalSolution implements RunnableSolution { } } protected function isSafePath(string $path): bool { if (!Str::startsWith($path, ['/', './'])) { ...
9.8
https://github.com/facade/ignition/commit/11ffca14abd22db779d90b12e193f8000f6d184b
https://github.com/facade/ignition
11ffca14abd22db779d90b12e193f8000f6d184b
2021-03-29
{ "after_version": " use Facade\\IgnitionContracts\\RunnableSolution; use Illuminate\\Support\\Facades\\Blade; use Illuminate\\Support\\Str; class MakeViewVariableOptionalSolution implements RunnableSolution { public function run(array $parameters = []) } } protected function isSafePath(string $pat...
deltasecommits_77
DeltaSecommits
CWE-369
{'CWE-369'}
cc
const int64 out_depth = output->dim_size(3); const int64 patch_depth = filter.dim_size(2); if (in_depth % patch_depth != 0) { ctx->SetStatus(errors::InvalidArgument( "input depth must be evenly divisible by filter depth: ", in_depth, } const int64 num_groups = in_depth / patch_dept...
const int64 out_depth = output->dim_size(3); const int64 patch_depth = filter.dim_size(2); if (patch_depth <= 0) { ctx->SetStatus(errors::InvalidArgument( "filter depth must be stricly positive, got ", patch_depth)); return; } if (in_depth % patch_depth != 0) { ctx->SetS...
2.5
https://github.com/tensorflow/tensorflow/commit/b12aa1d44352de21d1a6faaf04172d8c2508b42b
https://github.com/tensorflow/tensorflow
b12aa1d44352de21d1a6faaf04172d8c2508b42b
2021-05-21
{ "after_version": " struct LaunchConv2DOp<CPUDevice, T> { const int64 out_depth = output->dim_size(3); const int64 patch_depth = filter.dim_size(2); if (patch_depth <= 0) { ctx->SetStatus(errors::InvalidArgument( \"filter depth must be stricly positive, got \", patch_depth)); retur...
deltasecommits_78
DeltaSecommits
CWE-22
{'CWE-22'}
rs
port_ranges: Vec<(u16, u16)>, } // latitude and longitude omitted #[derive(serde::Deserialize)] struct City { impl ServerList { fn new(client: reqwest::blocking::Client, token: &str) -> Self { client .get(&format!("{}/vpn/servers", BASE_URL)) .bearer_auth(token) .se...
port_ranges: Vec<(u16, u16)>, } impl Server { fn validate_hostname(&self) -> bool { self.hostname .chars() .all(|c| c.is_ascii_alphanumeric() || c == '-') } } // latitude and longitude omitted #[derive(serde::Deserialize)] struct City { impl ServerList { fn new(client:...
9.1
https://github.com/NilsIrl/MozWire/pull/17/commits/dd0639bf2876773b66382f47285f7db701f628d9
https://github.com/NilsIrl/MozWire
dd0639bf2876773b66382f47285f7db701f628d9
2021-08-25
{ "after_version": " struct Server { port_ranges: Vec<(u16, u16)>, } impl Server { fn validate_hostname(&self) -> bool { self.hostname .chars() .all(|c| c.is_ascii_alphanumeric() || c == '-') } } // latitude and longitude omitted #[derive(serde::Deserialize)] struct City ...
deltasecommits_79
DeltaSecommits
CWE-369
{'CWE-369'}
cc
const TfLiteTensor* lookup, const TfLiteTensor* value, TfLiteTensor* output) { const int row_size = SizeOfDimension(value, 0); const int row_bytes = value->bytes / row_size; char* output_raw = GetTensorData<char>(output);
const TfLiteTensor* lookup, const TfLiteTensor* value, TfLiteTensor* output) { const int row_size = SizeOfDimension(value, 0); if (row_size == 0) { // Propagate empty tensor if input is empty return kTfLiteOk; } const int row_bytes = value->bytes / row_siz...
2.5
https://github.com/tensorflow/tensorflow/commit/f61c57bd425878be108ec787f4d96390579fb83e
https://github.com/tensorflow/tensorflow
f61c57bd425878be108ec787f4d96390579fb83e
2021-05-21
{ "after_version": " TfLiteStatus EvalSimple(TfLiteContext* context, TfLiteNode* node, const TfLiteTensor* lookup, const TfLiteTensor* value, TfLiteTensor* output) { const int row_size = SizeOfDimension(value, 0); if (row_size == 0) { // Propagate empty tensor i...
deltasecommits_80
DeltaSecommits
CWE-94
{'CWE-94'}
js
class Parser { // Parse JSON data constructor(data) { this.laureates = eval(`(${data})`).laureates; } inYear(year) {
class Parser { // Parse JSON data constructor(data) { this.laureates = JSON.parse(data}).laureates; } inYear(year) {
0
https://github.com/AnneTheDev/nobelprize/commit/00639d375b0efd097bc1eca18d9dc021691b9286
https://github.com/AnneTheDev/nobelprize
00639d375b0efd097bc1eca18d9dc021691b9286
2021-03-12
{ "after_version": " function output(laureate) { class Parser { // Parse JSON data constructor(data) { this.laureates = JSON.parse(data}).laureates; } inYear(year) {", "author": "AnneTheDev", "dataset_source": "rufimelo/DeltaSecommits", "file_path": "lib/index.js", "message": "Merge p...
deltasecommits_81
DeltaSecommits
CWE-22
{'CWE-22'}
py
return key def put(request, key, data, filename=None, content_type=None, remove(request, key) def _do(request, do, key): if do == 'get': _do_get(request, key) elif do == 'remove': _do_remove(request, key) def execute(pagename, request): do = request.values.get('d...
return key def valid_key(key): # make sure the key looks like keys generated by key() if not isinstance(key, unicode): # key is None (not given in url args) or something unexpected return False try: int(key, 16) # try to evaluate as hex number except ValueError: # ...
0
https://github.com/moinwiki/moin-1.9/commit/6b96a9060069302996b5af47fd4a388fc80172b7
https://github.com/moinwiki/moin-1.9
6b96a9060069302996b5af47fd4a388fc80172b7
2020-11-11
{ "after_version": " def key(request, wikiname=None, itemname=None, attachname=None, content=None, se return key def valid_key(key): # make sure the key looks like keys generated by key() if not isinstance(key, unicode): # key is None (not given in url args) or something unexpected retur...
deltasecommits_82
DeltaSecommits
CWE-125
{'CWE-125'}
cc
const int input_start = start * input_size_per_batch; const int input_end = limit * input_size_per_batch; for (int64 index = input_start; index < input_end; index++) { int64 grad_out_index = argmax_flat(index); if (!include_batch_in_index) { const int64 cur_batch ...
const int input_start = start * input_size_per_batch; const int input_end = limit * input_size_per_batch; for (int64 index = input_start; index < input_end; index++) { if (index >= argmax.NumElements()) { break; } int64 grad_out_index = argmax_flat(index...
2.5
https://github.com/tensorflow/tensorflow/commit/dcd7867de0fea4b72a2b34bd41eb74548dc23886
https://github.com/tensorflow/tensorflow
dcd7867de0fea4b72a2b34bd41eb74548dc23886
2021-05-21
{ "after_version": " struct LaunchMaxPoolingGradWithArgmax<CPUDevice, T> { const int input_start = start * input_size_per_batch; const int input_end = limit * input_size_per_batch; for (int64 index = input_start; index < input_end; index++) { if (index >= argmax.NumElements()) { ...
deltasecommits_83
DeltaSecommits
CWE-79
{'CWE-79'}
php
?> <li class="nav-item dropleft"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?php echo htmlspecialchars($UserData->name),' ',htmlspecialchars($UserData->surname)?></a> <div class="dropdown-menu" style="min-width: 25rem;" role="menu"> <div c...
?> <li class="nav-item dropleft"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" ng-non-bindable><?php echo htmlspecialchars($UserData->name),' ',htmlspecialchars($UserData->surname)?></a> <div class="dropdown-menu" style="min-width: 25rem;" role="menu">...
5.4
https://github.com/livehelperchat/livehelperchat/commit/8fdb4f67ac1a095331aa0fb4630ef9dfe8e75dcb
https://github.com/livehelperchat/livehelperchat
8fdb4f67ac1a095331aa0fb4630ef9dfe8e75dcb
2022-01-29
{ "after_version": " ?> <li class=\"nav-item dropleft\"> <a href=\"#\" class=\"nav-link dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\" ng-non-bindable><?php echo htmlspecialchars($UserData->name),' ',htmlspecialchars($UserData->surname)?></a> <div class=\"dropdown-menu\" s...
deltasecommits_84
DeltaSecommits
CWE-400
{'CWE-400'}
js
} getAnnotationURL(sourceMapString) { return sourceMapString.match(/\/\*\s*# sourceMappingURL=(.*)\*\//)[1].trim() } loadAnnotation(css) { let annotations = css.match(/\/\*\s*# sourceMappingURL=.*\*\//gm) if (annotations && annotations.length > 0) { // Locate the last sourceMappingURL to av...
} getAnnotationURL(sourceMapString) { return sourceMapString.match(/\/\*\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\*\//)[1].trim() } loadAnnotation(css) { let annotations = css.match(/\/\*\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\*\//gm) if (annotations && annotations.length > 0)...
5.3
https://github.com/postcss/postcss/commit/2b1d04c867995e55124e0a165b7c6622c1735956
https://github.com/postcss/postcss
2b1d04c867995e55124e0a165b7c6622c1735956
2022-01-07
{ "after_version": " class PreviousMap { } getAnnotationURL(sourceMapString) { return sourceMapString.match(/\\/\\*\\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\\*\\//)[1].trim() } loadAnnotation(css) { let annotations = css.match(/\\/\\*\\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\\*\\...
deltasecommits_85
DeltaSecommits
CWE-400
{'CWE-400'}
js
var result = null; if (dataUrlParts.length === 2) { var extractedInfo = /^data:(\w*\/\w*);*(charset=[\w=-]*)*;*$/.exec( dataUrlParts[0] ); if (Array.isArray(extractedInfo)) {
var result = null; if (dataUrlParts.length === 2) { var extractedInfo = /^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec( dataUrlParts[0] ); if (Array.isArray(extractedInfo)) {
7.5
https://github.com/MrRio/jsPDF/commit/d8bb3b39efcd129994f7a3b01b632164144ec43e
https://github.com/MrRio/jsPDF
d8bb3b39efcd129994f7a3b01b632164144ec43e
2021-03-12
{ "after_version": " import { atob, btoa } from \"../libs/AtobBtoa.js\"; var result = null; if (dataUrlParts.length === 2) { var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec( dataUrlParts[0] ); if (Array.isArray(extractedInfo)) {", "author": "Yeti...
deltasecommits_86
DeltaSecommits
CWE-125
{'CWE-125'}
cc
const Tensor& input_splits = context->input(1); const auto input_splits_flat = input_splits.flat<SPLITS_TYPE>(); // Since we limit to a 2-D input (flat_values of rank 1 and a single splits // tensor), our output dimension will be 1 with it's size equal to the // number of splits (outer dimension or...
const Tensor& input_splits = context->input(1); const auto input_splits_flat = input_splits.flat<SPLITS_TYPE>(); // Operation will treat first argument in input_splits as if it were zero // regardless of its actual value since splits should begin with zero and // end with the length of the input va...
2.5
https://github.com/tensorflow/tensorflow/commit/51300ba1cc2f487aefec6e6631fef03b0e08b298
https://github.com/tensorflow/tensorflow
51300ba1cc2f487aefec6e6631fef03b0e08b298
2021-05-21
{ "after_version": " class UnicodeEncodeOp : public OpKernel { const Tensor& input_splits = context->input(1); const auto input_splits_flat = input_splits.flat<SPLITS_TYPE>(); // Operation will treat first argument in input_splits as if it were zero // regardless of its actual value since splits shou...
deltasecommits_87
DeltaSecommits
CWE-476
{'CWE-476'}
cc
} else if (IsExit(curr_node)) { // Exit to the parent frame. parent = parent_nodes[curr_id]; frame_name = cf_info->frame_names[parent->id()]; parent = parent_nodes[parent->id()]; } else {
} else if (IsExit(curr_node)) { // Exit to the parent frame. parent = parent_nodes[curr_id]; if (!parent) { return errors::InvalidArgument( "Invalid Exit op: Cannot find a corresponding Enter op."); } frame_name = cf_info->frame_names[parent->id()]; parent = p...
5.5
https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff
https://github.com/tensorflow/tensorflow
05cbebd3c6bb8f517a158b0155debb8df79017ff
2021-11-10
{ "after_version": " Status ImmutableExecutorState::BuildControlFlowInfo(const Graph* g, } else if (IsExit(curr_node)) { // Exit to the parent frame. parent = parent_nodes[curr_id]; if (!parent) { return errors::InvalidArgument( \"Invalid Exit op: Cannot find a corresponding ...
deltasecommits_88
DeltaSecommits
CWE-79
{'CWE-79', 'CWE-843'}
js
let i let j if (value === undefined || typeof value === 'boolean' || typeof value === 'object') { // Cannot escape on these values return value } else if (typeof value === 'number') { // Value is a number, no reason to escape return `${value}` } else { // Loop through value to find HTML entities ...
let i let j if (typeof value === 'object') { // Cannot escape on this value if (!value) { return false // it is falsey to return false } else if (Array.isArray(value)) { if (value.length === 0) { return false // empty arrays are falsey } else { return '[Array]' // print ...
5.4
https://github.com/rooseveltframework/teddy/commit/64c556717b4879bf8d4c30067cf6e70d899a3dc0
https://github.com/rooseveltframework/teddy
64c556717b4879bf8d4c30067cf6e70d899a3dc0
2021-10-12
{ "after_version": " function escapeEntities (value) { let i let j if (typeof value === 'object') { // Cannot escape on this value if (!value) { return false // it is falsey to return false } else if (Array.isArray(value)) { if (value.length === 0) { return false // empty arrays are...
deltasecommits_89
DeltaSecommits
CWE-22
{'CWE-22', 'CWE-548'}
rb
def list_directory(path_info, path, script_name) files = [['../', 'Parent Directory', '', '', '']] glob = ::File.join(path, '*') url_head = (script_name.split('/') + path_info.split('/')).map do |part| Rack::Utils.escape_path part end Dir[glob].sort.each do |node| st...
def list_directory(path_info, path, script_name) files = [['../', 'Parent Directory', '', '', '']] url_head = (script_name.split('/') + path_info.split('/')).map do |part| Rack::Utils.escape_path part end Dir.entries(path).reject { |e| e.start_with?('.') }.sort.each do |node| ...
8.6
https://github.com/rack/rack/commit/dddb7ad18ed79ca6ab06ccc417a169fde451246e
https://github.com/rack/rack
dddb7ad18ed79ca6ab06ccc417a169fde451246e
2020-07-06
{ "after_version": " def check_forbidden(path_info) def list_directory(path_info, path, script_name) files = [['../', 'Parent Directory', '', '', '']] url_head = (script_name.split('/') + path_info.split('/')).map do |part| Rack::Utils.escape_path part end Dir.entries(path).reje...
deltasecommits_90
DeltaSecommits
CWE-79
{'CWE-79'}
php
'first_name'=> e($user->first_name), 'last_name'=> e($user->last_name), 'employee_number' => e($user->employee_num), 'checkout_notes' => $user->pivot->note, 'last_checkout' => Helper::getFormattedDateObject($user->pivot->created_at, 'datet...
'first_name'=> e($user->first_name), 'last_name'=> e($user->last_name), 'employee_number' => e($user->employee_num), 'checkout_notes' => e($user->pivot->note), 'last_checkout' => Helper::getFormattedDateObject($user->pivot->created_at, 'da...
5.4
https://github.com/snipe/snipe-it/commit/ff81e6d5366c2cfb15618793ad919ae4cbb3ac57
https://github.com/snipe/snipe-it
ff81e6d5366c2cfb15618793ad919ae4cbb3ac57
2021-12-03
{ "after_version": " public function transformCheckedoutAccessory ($accessory, $accessory_users, $tot 'first_name'=> e($user->first_name), 'last_name'=> e($user->last_name), 'employee_number' => e($user->employee_num), 'checkout_notes' => e($user->pivot...
deltasecommits_91
DeltaSecommits
CWE-20
{'CWE-434', 'CWE-20'}
go
"strings" "time" gouuid "github.com/satori/go.uuid" "github.com/unknwon/com" "github.com/gogs/git-module" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/cryptoutil" "gogs.io/gogs/internal/db/errors" "gogs.io/gogs/internal/gitutil" "gogs.io/gogs/internal/osutil" "gogs.io/gogs/internal/process" "gogs....
"strings" "time" "github.com/pkg/errors" gouuid "github.com/satori/go.uuid" "github.com/unknwon/com" "github.com/gogs/git-module" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/cryptoutil" dberrors "gogs.io/gogs/internal/db/errors" "gogs.io/gogs/internal/gitutil" "gogs.io/gogs/internal/osutil" "gogs...
8.8
https://github.com/gogs/gogs/commit/0fef3c9082269e9a4e817274942a5d7c50617284
https://github.com/gogs/gogs
0fef3c9082269e9a4e817274942a5d7c50617284
2022-03-28
{ "after_version": " import ( \t\"strings\" \t\"time\" \t\"github.com/pkg/errors\" \tgouuid \"github.com/satori/go.uuid\" \t\"github.com/unknwon/com\" \t\"github.com/gogs/git-module\" \t\"gogs.io/gogs/internal/conf\" \t\"gogs.io/gogs/internal/cryptoutil\" \tdberrors \"gogs.io/gogs/internal/db/errors\" \t\"gogs.io/...
deltasecommits_92
DeltaSecommits
CWE-434
{'CWE-434', 'CWE-20'}
go
"strings" "time" gouuid "github.com/satori/go.uuid" "github.com/unknwon/com" "github.com/gogs/git-module" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/cryptoutil" "gogs.io/gogs/internal/db/errors" "gogs.io/gogs/internal/gitutil" "gogs.io/gogs/internal/osutil" "gogs.io/gogs/internal/process" "gogs....
"strings" "time" "github.com/pkg/errors" gouuid "github.com/satori/go.uuid" "github.com/unknwon/com" "github.com/gogs/git-module" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/cryptoutil" dberrors "gogs.io/gogs/internal/db/errors" "gogs.io/gogs/internal/gitutil" "gogs.io/gogs/internal/osutil" "gogs...
8.8
https://github.com/gogs/gogs/commit/0fef3c9082269e9a4e817274942a5d7c50617284
https://github.com/gogs/gogs
0fef3c9082269e9a4e817274942a5d7c50617284
2022-03-28
{ "after_version": " import ( \t\"strings\" \t\"time\" \t\"github.com/pkg/errors\" \tgouuid \"github.com/satori/go.uuid\" \t\"github.com/unknwon/com\" \t\"github.com/gogs/git-module\" \t\"gogs.io/gogs/internal/conf\" \t\"gogs.io/gogs/internal/cryptoutil\" \tdberrors \"gogs.io/gogs/internal/db/errors\" \t\"gogs.io/...
deltasecommits_93
DeltaSecommits
CWE-476
{'CWE-476'}
cc
OpInputList sparse_weights_inputs; TF_RETURN_IF_ERROR( context->input_list("sparse_weights", &sparse_weights_inputs)); OpInputList dense_weights_inputs; TF_RETURN_IF_ERROR( context->input_list("dense_weights", &dense_weights_inputs)); OpOutputList sparse_weights_outputs; TF_RETURN_IF_ERROR(cont...
OpInputList sparse_weights_inputs; TF_RETURN_IF_ERROR( context->input_list("sparse_weights", &sparse_weights_inputs)); if (sparse_indices_inputs.size() != sparse_weights_inputs.size()) return errors::InvalidArgument( "sparse_indices and sparse_weights must have the same length, got ", sp...
2.5
https://github.com/tensorflow/tensorflow/commit/f7cc8755ac6683131fdfa7a8a121f9d7a9dec6fb
https://github.com/tensorflow/tensorflow
f7cc8755ac6683131fdfa7a8a121f9d7a9dec6fb
2021-05-21
{ "after_version": " Status ModelWeights::Initialize(OpKernelContext* const context) { OpInputList sparse_weights_inputs; TF_RETURN_IF_ERROR( context->input_list(\"sparse_weights\", &sparse_weights_inputs)); if (sparse_indices_inputs.size() != sparse_weights_inputs.size()) return errors::InvalidArgume...
deltasecommits_94
DeltaSecommits
CWE-125
{'CWE-125'}
cc
const Tensor* example_labels_t; TF_RETURN_IF_ERROR(context->input("example_labels", &example_labels_t)); auto example_labels = example_labels_t->flat<float>(); OpInputList dense_features_inputs; TF_RETURN_IF_ERROR(
const Tensor* example_labels_t; TF_RETURN_IF_ERROR(context->input("example_labels", &example_labels_t)); auto example_labels = example_labels_t->flat<float>(); if (example_labels.size() != num_examples) { return errors::InvalidArgument("Expected ", num_examples, " example ...
5.5
https://github.com/tensorflow/tensorflow/commit/a4e138660270e7599793fa438cd7b2fc2ce215a6
https://github.com/tensorflow/tensorflow
a4e138660270e7599793fa438cd7b2fc2ce215a6
2021-08-25
{ "after_version": " Status Examples::Initialize(OpKernelContext* const context, const Tensor* example_labels_t; TF_RETURN_IF_ERROR(context->input(\"example_labels\", &example_labels_t)); auto example_labels = example_labels_t->flat<float>(); if (example_labels.size() != num_examples) { return errors::Inv...
deltasecommits_95
DeltaSecommits
CWE-94
{'CWE-94'}
js
var ref = resultsData.resultsMap[parts[i].index]; if (ref) { var value = null; try { eval('value = ref.' + parts[i].value + ';'); } catch (e) { error = new Error(e.message); ...
var ref = resultsData.resultsMap[parts[i].index]; if (ref) { var value = ref[parts[i].value]||null; if (value) { if (value.match && value.match(/^[\w:]+$/)) { path += value; }
0
https://github.com/hapijs/bassmaster/commit/b751602d8cb7194ee62a61e085069679525138c4
https://github.com/hapijs/bassmaster
b751602d8cb7194ee62a61e085069679525138c4
2017-10-24
{ "after_version": " internals.batch = function (batchRequest, resultsData, pos, parts, callback) { var ref = resultsData.resultsMap[parts[i].index]; if (ref) { var value = ref[parts[i].value]||null; if (value) { if (value.match && value.m...
deltasecommits_96
DeltaSecommits
CWE-79
{'CWE-79'}
php
return false; } /** * Retrieve a file by ID *
return false; } /** * Detects whether the file contains PHP or script tags, eg to check for embedded code in GIFs * @param $file_path * @return bool */ public static function isFileFreeFromScriptTags($file_path) { if ($contents...
6.1
https://github.com/idno/known/commit/80b716a8392fb71cfce84d03aaf7c045c62f6350
https://github.com/idno/known
80b716a8392fb71cfce84d03aaf7c045c62f6350
2022-07-09
{ "after_version": " public static function isImage($file_path) return false; } /** * Detects whether the file contains PHP or script tags, eg to check for embedded code in GIFs * @param $file_path * @return bool */ public static function isFile...
deltasecommits_97
DeltaSecommits
CWE-79
{'CWE-79'}
php
// Make sure the fileName is unique but only if chunking is disabled if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { $ext = strrpos($fileName, '.'); $fileName_a = substr($fileName, 0, $ext); $fileName_b = substr($fileName, $ext); $count = 1; while (file_exists($targe...
// Make sure the fileName is unique but only if chunking is disabled if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { $ext = strrpos($fileName, '.'); $fileName_a = substr($fileName, 0, $ext); $fileName_b = substr($fileName, $ext); $fileName_b = strtolower($fileName_b); ...
5.4
https://github.com/microweber/microweber/commit/9ebbb4dd35da74025ab6965f722829a7f8f86566
https://github.com/microweber/microweber
9ebbb4dd35da74025ab6965f722829a7f8f86566
2022-07-02
{ "after_version": " // Make sure the fileName is unique but only if chunking is disabled if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { $ext = strrpos($fileName, '.'); $fileName_a = substr($fileName, 0, $ext); $fileName_b = substr($fileName, $ext); $fileName_b = str...
deltasecommits_98
DeltaSecommits
CWE-79
{'CWE-79'}
js
}; ac.prehighlightClassName = "yui-ac-prehighlight"; ac.animSpeed = 0; ac.useShadow = true; ac.autoSnapContainer = true; ac.delimChar = e.getAttribute("autoCompleteDelimChar");
}; ac.prehighlightClassName = "yui-ac-prehighlight"; ac.animSpeed = 0; ac.formatResult = ac.formatEscapedResult; ac.useShadow = true; ac.autoSnapContainer = true; ac.delimChar = e.getAttribute("autoCompleteDelimChar");
4.8
https://github.com/jenkinsci/jenkins/commit/f67068170b55633571e5462e52b6124b23d7cb84
https://github.com/jenkinsci/jenkins
f67068170b55633571e5462e52b6124b23d7cb84
2022-05-14
{ "after_version": " var jenkinsRules = { }; ac.prehighlightClassName = \"yui-ac-prehighlight\"; ac.animSpeed = 0; ac.formatResult = ac.formatEscapedResult; ac.useShadow = true; ac.autoSnapContainer = true; ac.delimChar = e.getAttribute(\"autoCompleteDelimChar\"...
deltasecommits_99
DeltaSecommits
CWE-434
{'CWE-434', 'CWE-79'}
php
'quantity' => ['required', 'integer', 'min:0'], 'price' => ['required', 'numeric', 'min:0'], 'sale_price' => ['nullable', 'numeric'], 'weight' => ['nullable', 'numeric', 'min:0'] ]; } }
'quantity' => ['required', 'integer', 'min:0'], 'price' => ['required', 'numeric', 'min:0'], 'sale_price' => ['nullable', 'numeric'], 'weight' => ['nullable', 'numeric', 'min:0'], 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'cover' => '...
5.4
https://github.com/jsdecena/laracom/commit/256026193ce994dc4c1365e02f414d8a0cd77ae8
https://github.com/jsdecena/laracom
256026193ce994dc4c1365e02f414d8a0cd77ae8
2022-02-06
{ "after_version": " public function rules() 'quantity' => ['required', 'integer', 'min:0'], 'price' => ['required', 'numeric', 'min:0'], 'sale_price' => ['nullable', 'numeric'], 'weight' => ['nullable', 'numeric', 'min:0'], 'image' => 'image|mimes:jpeg,png,...