text
stringlengths
79
3.72M
<vulnerable_code>package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.ApiResponse; import io.swagger.client.Configuration; import io.swagger.client.Pair; import javax.ws.rs.core.GenericType; import io.swagger.client.model.Client; import j...
<vulnerable_code>package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.ApiResponse; import io.swagger.client.Configuration; import io.swagger.client.Pair; import javax.ws.rs.core.GenericType; import java.io.File; import io.swagger.client.mo...
<vulnerable_code>package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.ApiResponse; import io.swagger.client.Configuration; import io.swagger.client.Pair; import javax.ws.rs.core.GenericType; import io.swagger.client.model.Order; import ja...
<vulnerable_code>package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.ApiResponse; import io.swagger.client.Configuration; import io.swagger.client.Pair; import javax.ws.rs.core.GenericType; import io.swagger.client.model.User; import jav...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>/* * Swagger Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger...
<vulnerable_code>import java.io.InputStream; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import org.glassfish.jersey.logging.LoggingFeature; import java.util.Collection; public int getReadTimeout() { return readTimeout; } /** * Set the read timeout (in milliseconds). * A val...
<vulnerable_code>import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Type; import java.net.URLConnection; import java.net.URLEncoder; } if (tempFolderPath == null) return File.createTempFile(prefix, suffix); e...
<vulnerable_code>import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.file.Files; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiExcepti...
<vulnerable_code>import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @Test public void testUploadFile() throws Exception { File file = File.createTempFile("test", "hello.txt"); BufferedWriter ...
<vulnerable_code> 347, 353, 356, 374, 387, 424, 425, 430, 446, 459, 472, 485, 502, 503, 509, 508, 524, 523, 539, 553, 554, 559, 560, 561, 562, 567, 652, 698, 756, 801, 802, 806, 831, 867, 913, 935, 944, 953, 968, 980, 994, ...
<vulnerable_code> .replace(/([$&;|])/gu, "\\$1") .replace(/([()<>])/gu, "\\$1") .replace(/(["'`])/gu, "\\$1") .replace(/\{(?=([^]*?(?:,|\.)[^]*?)\})/gu, "\\{") .replace(/(?<==(?:[^]*?:)?)(~)(?=[\s+\-/0:=]|$)/gu, "\\$1"); } else if (quoted) { result = result.replace(/'/gu, `'\\''`);<co...
<vulnerable_code> zFree = sqlite3_mprintf("%s/", zPath); if( zFree==0 ){ rc = SQLITE_NOMEM; } zPath = (const char*)zFree; nPath++; } } }else{ if( zName[nName-1]!='/' ){ zName = zFree = sqlite3_mprintf("%s/", zName); nName++; if( zName==0 ){ rc = ...
<vulnerable_code> * NOTE: not using scmp_rule_add_exact as that was not doing anything * at all (presumably due to having all the architectures defined). */ const struct scmp_arg_cmp no_tty_inject = { /* We learned that existing programs make legitimate requests with all * bits set in the...
<vulnerable_code>CUSTOM_TRACK_NAMES = ["Genes", "ClinVar", "ClinVar CNVs"] def set_session_tracks(display_obj): """Save igv tracks as a session object. This way it's easy to verify that a user is requesting one of these files from remote_static view endpoint """ session_tracks = list(display_obj.get("ref...
<vulnerable_code> Based on code from answers to this thread: https://stackoverflow.com/questions/6656363/proxying-to-another-web-service-with-flask/ """ resp = requests.request( method=request.method, url=remote_url, file_path = request.args.get("file") or "." # Check that us...
<vulnerable_code> with app.test_client() as client: # GIVEN that user is logged in client.get(url_for("auto_login")) with client.session_transaction() as session: # GIVEN that resource file exists in user session session["igv_tracks"] = [file] # THEN the resou...
<vulnerable_code> import attr import yaml from netaddr import IPSet from synapse.api.room_versions import KNOWN_ROOM_VERSIONS from synapse.util.stringutils import parse_and_validate_server_name # in the list. DEFAULT_BIND_ADDRESSES = ["::", "0.0.0.0"] DEFAULT_IP_RANGE_BLACKLIST = [ # Localhost "127.0.0.0/8", ...
<vulnerable_code>var contra = require('contra'), path = require('path'), fUtils = require('./files'), cp = require('child_process'); var gitApp = 'git', gitExtra = { env: process.env }; var escapeQuotes = function (str) { if (typeof str === 'string') { return str.replace(/(["$`\\])/g, '\\$1'); } ...
<vulnerable_code>var version = require('../'), assert = require('assert'), fs = require('fs'), vinylFs = require('vinyl-fs'), path = require('path'), cp = require('child_process'), File = require('vinyl'), through = require('through2'), fUtil = require('../lib/files'), git = require(...
<vulnerable_code> for (i=0; i < (ssize_t)image->rows; i++) { q=QueueAuthenticPixels(image,0,i,image->columns,1,exception); for (j=0; j < (ssize_t)image->columns; j++) { if (GetPixelRed(q) == ScaleCharToQuantum(1))...
<vulnerable_code> q = tileno / p_cp->tw; /* here calculation of tx0, tx1, ty0, ty1, maxprec, l_dx and l_dy */ *p_tx0 = opj_int_max((OPJ_INT32)(p_cp->tx0 + p * p_cp->tdx), (OPJ_INT32)p_image->x0); *p_tx1 = opj_int_min((OPJ_INT32)(p_cp->tx0 + (p + 1) * p_cp->tdx), (OPJ_INT32)p_image->x1); *p_ty0 = opj_int_max((OPJ_I...
<vulnerable_code> /*fprintf(stderr, "Tile coordinate = %d,%d\n", p, q);*/ /* 4 borders of the tile rescale on the image if necessary */ l_tile->x0 = opj_int_max((OPJ_INT32)(l_cp->tx0 + p * l_cp->tdx), (OPJ_INT32)l_image->x0); l_tile->y0 = opj_int_max((OPJ_INT32)(l_cp->ty0 + q * l_cp->tdy), (OPJ_INT32)l_image->y0);...
<vulnerable_code> */ xbutton = $( '<button type="button" id="' + id + '-check-num-' + key + '" class="ntdelbutton">' + '<span class="remove-tag-icon" aria-hidden="true"></span>' + '<span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + ' ' + val + '</span>' + '</button>' );...
<vulnerable_code>var tagBox,array_unique_noempty;!function(a){var b=window.tagsSuggestL10n&&window.tagsSuggestL10n.tagDelimiter||",";array_unique_noempty=function(b){var c=[];return a.each(b,function(b,d){d=a.trim(d),d&&a.inArray(d,c)===-1&&c.push(d)}),c},tagBox={clean:function(a){return","!==b&&(a=a.replace(new RegExp...
<vulnerable_code> """, """ @external @nonreentrant("B") @nonreentrant("C") def double_nonreentrant(): pass """, """<commit_title>[PATCH] fix: only allow valid identifiers to be nonreentrant keys<commit_description>disallow invalid identifiers like `" "`, `"123abc"` from being keys for non-reentrant l...
<vulnerable_code><commit_title>[PATCH] fix: only allow valid identifiers to be nonreentrant keys<commit_description>disallow invalid identifiers like `" "`, `"123abc"` from being keys for non-reentrant locks. this commit also refactors the `validate_identifiers` helper function to be in the `ast/` subdirectory, and sl...
<vulnerable_code> # support older exceptions that don't annotate - remove this in the future! self.lineno, self.col_offset = items[0][:2] else: self.annotations = items def with_annotation(self, *annotations): """<commit_title>[PATCH] fix: only allow valid identif...
<vulnerable_code> from vyper import ast as vy_ast from vyper.abi_types import ABIType from vyper.exceptions import ( CompilerPanic, InvalidLiteral, UnknownAttribute, ) from vyper.semantics.analysis.levenshtein_utils import get_levenshtein_error_suggestions from vyper.semantics.namespace import validate_iden...
<vulnerable_code>from typing import Any, Dict, List, Optional, Tuple from vyper import ast as vy_ast from vyper.ast.validation import validate_call_args from vyper.exceptions import ( ArgumentException, msg = "Nonreentrant decorator disallowed on `__init__`" raise Fu...
<vulnerable_code> int length; length = strlen (filename); if (length > 0) { if ((filename[0] == '\"') && (filename[length - 1] == '\"')) return weechat_strndup (filename + 1, length - 2);<commit_title>[PATCH] irc: fix parsing of DCC filename<commit_description><fixed_code> int le...
<vulnerable_code># Future editors beware: # It is easy to create security problems around the difference between the syntax of # HTTP messages (protocol elements limited to exhaustively enumerated ASCII characters) # and Unicode string operatons and pattern matching. # The re.ASCII merely switches character class sem...
<vulnerable_code># Tests for aiohttp/protocol.py import asyncio from contextlib import nullcontext import re from typing import Any, List from unittest import mock from urllib.parse import quote parser.feed_data(text) _pad : dict[bytes, str] = { b"": "empty", # not a typo. Python likes triple zero ...
<vulnerable_code> int PackLinuxElf32::canUnpack() { if (super::canUnpack()) { return true; } if (Elf32_Ehdr::ET_DYN==get_te16(&ehdri.e_type)) { PackLinuxElf32help1(fi); } return false; } int PackLinuxElf64::canUnpack() { if (super::canUnpack()) { return true; } ...
<vulnerable_code> .addClass(placement) .data('bs.' + this.type, this) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.$element.trigger('inserted.bs.' + this.type) var pos = this.getPosition()<commit_title>[PATCH] fix(toolt...
<vulnerable_code>import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.SQLQuery; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.security.permission.In...
<vulnerable_code>import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.SQLQuery; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.security.permission.In...
<vulnerable_code> const tableName = Request.getRequiredParam(req, 'tableName') const cols = Request.getJsonParam(req, 'cols', []) const filter = Request.getJsonParam(req, 'filter') const sort = Request.getRestParam(req, 'sort', '') Response.setContentTypeFile(res, 'data.csv', null, Respons...
<vulnerable_code># -*- coding: utf-8 -*- from contextlib import suppress import logging import sys from typing import Any, Dict, List, Optional, Tuple, Type, Union from flask_appbuilder._compat import as_unicode from flask_appbuilder.const import ( LOGMSG_ERR_DBI_ADD_GENERIC, LOGMSG_ERR_DBI_DEL_GENERIC, LO...
<vulnerable_code> IOTC_TT_TESTGROUP_BEGIN(utest_memory_calloc) IOTC_TT_TESTCASE( utest__iotc_memory_calloc, { void* ptr = __iotc_calloc( /*num=*/1, /*size=*/8); tt_want_ptr_op(NULL, !=, ptr); __iotc_free(ptr); }) IOTC_TT_TESTCASE( utest__iotc_memory_calloc__zero_num, { ...
<vulnerable_code> } public CompletableFuture<?> start() { LOG.info("Starting JsonRPC service on {}:{}", config.getHost(), config.getPort()); final CompletableFuture<?> resultFuture = new CompletableFuture<>(); try { resultFuture.complete(null); config.setPort(httpSer...
<vulnerable_code> } @Test public void createsPrincipleWithOnlyRequiredValues() { final TomlUser tomlUser = new TomlUser("user", "password", list(), list(), list(), Optional.empty()); <commit_title>[PATCH] use JSON-RPC consistently (#1143)<commit_description>Signed-off-by: Sally MacFarlane <sally.macfa...
<vulnerable_code> << "\""; #endif std::cerr << ": " << e.what() << "\n"; } catch(std::exception const & e) {<commit_title>[PATCH] #70 Check that image buffer is created on error<commit_description><fixed_code> << "\""; #endif std::cerr << ": " << e.what() << "\n"; if (!b...
<vulnerable_code>from langchain_experimental.pal_chain.math_prompt import MATH_PROMPT from langchain_experimental.pydantic_v1 import Extra, Field COMMAND_EXECUTION_FUNCTIONS = ["system", "exec", "execfile", "eval"] class PALValidation:<commit_title>[PATCH] fix code injection vuln (#11233)<commit_description>- **Desc...
<vulnerable_code>var should = require('should'); var cdf = require("../index.js"); describe('f=cdf([13,2,5,3,23,7,11,13,19,23]) ', function(){ var data = [13,2,5,3,23,7,11,13,19,23]; var xs = [2, 3, 5, 7, 11, 13, 19, 23]; var ps = [0.1,0.2,0.3,0.4,0.5,0.7,0.8,1.0]; var f = cdf(data); test_x...
<vulnerable_code> atomic_t xfer_avail; struct gpio_chip gc; u8 *in_out_buffer; spinlock_t lock; struct gpio_desc *desc[8]; bool gpio_poll; struct cp2112_device *dev = gpiochip_get_data(chip); struct hid_device *hdev = dev->hdev; u8 *buf = dev->in_out_buffer; unsigned long flags; int ret; spin_lock_irqsave(...
<vulnerable_code> prop_type = gf_bs_read_u16(bs); prop_size -= 6; ISOM_DECREASE_SIZE_NO_ERR(ptr, prop_size) data2 = gf_malloc(sizeof(char) * (prop_size)); gf_bs_read_data(bs, data2, prop_size); tag_size-=prop_size; } else { prop_size = 0;<commit_title>[PATCH] fixed #2179<commit_description><fixed_...
<vulnerable_code>const _provider = Symbol('provider'); const _roundDimension = Symbol('roundDimension'); const _roundDimensions = Symbol('roundDimensions'); const _setDimensions = Symbol('setDimensions'); const _tempFile = Symbol('tempFile'); const _validate = Symbol('validate'); options = this[_parseOptions](opti...
<vulnerable_code> req->flags |= REQ_F_FAIL_LINK; } /* * Note: must call io_req_init_async() for the first time you * touch any members of io_wq_work. memset(&req->work, 0, sizeof(req->work)); req->flags |= REQ_F_WORK_INITIALIZED; req->work.identity = &req->identity; } } } static void io_req_clean_work(struct...
<vulnerable_code> $.sceditor.formats.bbcode .set('align', { html: function (element, attrs, content) { return '<div align="' + (attrs.defaultattr || 'left') + '">' + content + '</div>'; }, isInline: false }); if (size < 0) { size = 0; } return '<font data-scefontsize="' + attrs.defaultattr...
<vulnerable_code> verify(this.query).bindValues(expectedBindValues); } // // Helper methods //<commit_title>[PATCH] XWIKI-20601: Improved User Directory sorting<commit_description><fixed_code> verify(this.query).bindValues(expectedBindValues); } public static Stream<Arguments> p...
<vulnerable_code> } appended_lines_mark(n, count); msgmore((long)count); }<commit_title>[PATCH] patch 8.2.4215: illegal memory access when copying lines in<commit_description><fixed_code> } appended_lines_mark(n, count); if (VIsual_active) check_pos(curbuf, &VIsual); msgmore((long)count)...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 4214, /**/<commit_title>[PATCH] patch 8.2.4215: illegal memory access when copying lines in<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 4...
<vulnerable_code> int intervalStart; /*!< Start of iterating interval. */ int intervalEnd; /*!< End of iterating interval. */ rpmfiles files; /*!< File info set */ rpmcpio_t archive; /*!< Archive with payload */ unsigned char * found; /*!< Bit field of files found in the archive */ return (f...
<vulnerable_code> * s = Audio file format, primarily a WAV file */ const entryPattern = /^(.)(.*?)\t(.*?)\t(.*?)\t(.*?)\u000d\u000a$/ const entry = dirent.match(entryPattern) if (entry === null) {<commit_title>[PATCH] Prevent ReDos issue with regex inside gopher_parsedir<commit_description><fixed_code> ...
<vulnerable_code> if(Object.keys(req.files).length !== 0){ pic_path = req.files.fileUpload.path; }else{ req.pipe(fs.createWriteStream("public/images/i_hate_this.png")); } <commit_title>[PATCH] fml<commit_description><fixed_code> if(Object.keys(req.files).length !== 0){ pic_path = req.files.fileUploa...
<vulnerable_code>from synapse.storage.databases.main.lock import Lock from synapse.storage.databases.main.roommember import extract_heroes_from_room_summary from synapse.storage.roommember import MemberSummary from synapse.types import JsonDict, StateMap, get_domain_from_id from synapse.util import unwrapFirstError fro...
<vulnerable_code> return result async def on_federation_query_user_devices(self, user_id: str) -> JsonDict: stream_id, devices = await self.store.get_e2e_device_keys_for_federation_query( user_id )<commit_title>[PATCH] Merge pull request from GHSA-mp92-3jfm-3575<commit_descriptio...