text
stringlengths
79
3.72M
<vulnerable_code>/** * Copyright (c) 2006-2012, JGraph Ltd */ // Workaround for allowing target="_blank" in HTML sanitizer // see https://code.google.com/p/google-caja/issues/detail?can=2&q=&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary&groupby=&sort=&id=1296 if (typeof html4 !== 'undefined') { html4.ATTRI...
<vulnerable_code><commit_title>[PATCH] 18.0.0 release<commit_description><fixed_code> /*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */ !function(e,t){"object"==typeof exports&&"unde...
<vulnerable_code>// NOTE: Modified to support data URIs for images, ie. data:image/* // Modified to allow "word-break: break-word" in styles. It is done by adding "break-word" which is at index 55 of J array J[55] to "cssLitGroup" of "word-break" // Modified to support justify-content. Add possible values to J array be...
<vulnerable_code>window.mxLoadStylesheets=window.mxLoadStylesheets||!1; //fgnass.github.com/spin.js#v2.0.0 !function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c...
<vulnerable_code>var mxClient={VERSION:"17.5.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("tex...
<vulnerable_code>if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Modul...
<vulnerable_code> else { dispatch->next = ptr; } if (ptr->type == GNRC_NETTYPE_UNDEF) { /* most likely UDP for now so use that (XXX: extend if extension * headers make problems) */ dispatch_size += sizeof(udp_hdr_t); break; /* nothing ...
<vulnerable_code> if (PEND) goto invalid; PFETCH(c); if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) { if (c != MC_ESC(env->syntax)) goto invalid; PFETCH(c); } if (c != '}') goto invalid;<commit_title>[PATCH] fix #162: heap-buffer-overflow in fetch_interval_quantifier<commit_description>...
<vulnerable_code> defer.returnValue(self.cache[server_name]['verify_keys']) client = FederationHttpClient(self.sydent) result = yield client.get_json("matrix://%s/_matrix/key/v2/server/" % server_name) if 'verify_keys' not in result: raise SignatureVerifyException("No...
<vulnerable_code>from sydent.http.matrixfederationagent import MatrixFederationAgent from sydent.http.federation_tls_options import ClientTLSOptionsFactory logger = logging.getLogger(__name__) requests. """ @defer.inlineCallbacks def get_json(self, uri): """Make a GET request to an endpoint r...
<vulnerable_code> "matrix://%s/_matrix/federation/v1/openid/userinfo?access_token=%s" % ( args['matrix_server_name'], urllib.parse.quote(args['access_token']), ), ) if 'sub' not in result: raise Exception("Invalid response from homeserver")<commit_title...
<vulnerable_code>package org.xerial.snappy; import java.io.OutputStream; import org.xerial.snappy.buffer.CachedBufferAllocator; public class SnappyHadoopCompatibleOutputStream extends SnappyOutputStream { public SnappyHadoopCompatibleOutputStream(OutputStream out)<commit_title>[PATCH] Merge pull request from GHS...
<vulnerable_code>public class SnappyInputStream extends InputStream { private boolean finishedReading = false; protected final InputStream in; private byte[] compressed; private byte[] uncompressed; public SnappyInputStream(InputStream input) throws IOException { thi...
<vulnerable_code>public class SnappyOutputStream extends OutputStream { static final int MIN_BLOCK_SIZE = 1 * 1024; static final int DEFAULT_BLOCK_SIZE = 32 * 1024; // Use 32kb for the default block size /** * @param out * @param blockSize byte size of the internal buffer size * @thr...
<vulnerable_code>import java.nio.ByteOrder; import org.junit.Test; import org.xerial.snappy.buffer.BufferAllocatorFactory; import org.xerial.snappy.buffer.CachedBufferAllocator; import org.xerial.snappy.buffer.DefaultBufferAllocator; is.close(); } @Test public void smallWrites() throws...
<vulnerable_code> } } /* Tests happy cases for BitShuffle.shuffle method - double: 0, 10<commit_title>[PATCH] Merge pull request from GHSA-55g7-9cwv-5qfv<commit_description>* Validate chunk size to be within a configured maximum * Add constructors to have max size configurable * Code cleanup ...
<vulnerable_code> &ctx->req_buffer, NULL, NULL); if (ret == 0) ret = copy_EncKDCRepPart(&rep.enc_part, &ctx->enc_part); <commit_title>[PATCH] CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon<commit_description><fixed_code> &ctx->req_buffer, NULL, ...
<vulnerable_code> return ret; } static krb5_error_code pk_rd_pa_reply_dh(krb5_context context, const heim_octet_string *indata,<commit_title>[PATCH] CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon<commit_description><fixed_code> return ret; } /* * RFC 8062 section 7: * * The client then decr...
<vulnerable_code> gfn_t base_gfn, unsigned long npages); static pfn_t kvm_pin_pages(struct kvm_memory_slot *slot, gfn_t gfn, unsigned long size) { gfn_t end_gfn; pfn_t pfn; pfn = gfn_to_pfn_memslot(slot, gfn); end_gfn = gfn + (size >> PAGE_SHIFT); gfn += 1; if (is_error_noslot_pfn(pfn)) * Pi...
<vulnerable_code>app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use(multer({dest: './uploads'})); //ROUTES!! app.use('/', routes);<commit_title>[PATCH] Changed pictures save file<commit_description><fixed_code> app.use(bodyPars...
<vulnerable_code> class ZMQStreamHandler(websocket.WebSocketHandler): def is_cross_origin(self): """Check to see that origin and host match in the headers.""" origin_header = self.request.headers.get("Origin") host = self.request.headers.get("Host") if(origin_header == None or host...
<vulnerable_code>int path_chown_recursive(const char *path, uid_t uid, gid_t gid) { _cleanup_close_ int fd = -1; struct stat st; int r; fd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); if (fd < 0) (!gid_is_valid(gid) || st.st_gid == gid)) ...
<vulnerable_code>extern "C" { #endif /* __cplusplus */ /* * Log level; `LL_INFO` is the default. Use `cs_log_set_level()` to change it. */ void mjs_init_builtin(struct mjs *mjs, mjs_val_t obj) { mjs_val_t v; mjs_set(mjs, obj, "global", ~0, obj); mjs_set(mjs, obj, "load", ~0, mjs_mk_foreign_func(mjs...
<vulnerable_code>package ratpack.session.clientside; import ratpack.api.Nullable; import ratpack.api.UncheckedException; import java.nio.charset.StandardCharsets; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.time.Duration; public class ClientSideSessionConfig { pri...
<vulnerable_code>Contains functions to start, stop & poll systemd services. Probably not very useful outside this spawner. """ import asyncio import shlex async def start_transient_service( slice=None, ): """ Start a systemd transient service with given paramters """ run_cmd = [ '--unit',...
<vulnerable_code>async def test_env_setting(): unit_name = 'systemdspawner-unittest-' + str(time.time()) with tempfile.TemporaryDirectory() as d: await systemd.start_transient_service( unit_name, ['/bin/bash'], ['-c', 'env > {}/env'.format(d)], working_dir...
<vulnerable_code> setup( name='jupyterhub-systemdspawner', version='0.14', description='JupyterHub Spawner using systemd for resource isolation', long_description='See https://github.com/jupyterhub/systemdspawner for more info', url='https://github.com/jupyterhub/systemdspawner',<commit_title>[PATCH...
<vulnerable_code>"use strict"; const EventEmitter = require('events'); const requestp = require('request-promise'); class KeystoneV3Authenticator extends EventEmitter { constructor(credentials) { } }; const response = await requestp({ method: 'POST', uri: credentials.endpointUrl + '/auth/...
<vulnerable_code>"use strict"; const EventEmitter = require('events'); const requestp = require('request-promise'); const AUTH_STATUS = { UNAUTHENTICATED: 0, let authError = null; // Starts authStatus process requestp({ method: 'GET', uri: authUrl, head...
<vulnerable_code>"use strict"; const request = require('request'); const requestp = require('request-promise'); const SwiftEntity = require('./SwiftEntity'); class SwiftContainer extends SwiftEntity { create(name, stream, meta, extra) { return this.authenticator.authenticate().then(auth => new Promise((r...
<vulnerable_code>"use strict"; const requestp = require('request-promise'); const queryString = require('query-string'); class SwiftEntity { list(extra, query) { const querystring = query ? '?' + queryString.stringify(query) : ''; return this.authenticator.authenticate().then(auth => requestp({ ...
<vulnerable_code>"use strict"; const URL = require('url-parse'); const requestp = require('request-promise'); const SwiftContainer = require('./SwiftContainer'); const SwiftEntity = require('./SwiftEntity'); class SwiftClient extends SwiftEntity { constructor(authenticator) { super('Container', null, auth...
<vulnerable_code> return 0; } uint8_t ntlmssp_sig[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', 0}; static void ntlm_encode_header(struct wire_msg_hdr *hdr, uint32_t msg_type) str_offs = le32toh(str_hdr->offset); if ((str_offs < payload_offs) || (str_offs > buffer->length) || (str_offs + str_le...
<vulnerable_code>var SqlTypes = require('./data_types').SqlTypes; var bigInt = require('big-integer'); var { XMLParser, XMLValidator } = require("fast-xml-parser"); var NULL_UPPERCASE = 'NULL'; { try { ret = eval("(" + rawColumnValue + ")"); } catch (parseError) {<commit_title>[PATCH] Repl...
<vulnerable_code> connection, selectVariant, [{'COLA': {a: 1, b: [1, 2, 3, -Infinity, undefined], c: {a: 1}}}], callback ); }], done connection, selectArray, [{'COLA': ['a', 1]}], ...
<vulnerable_code> assert.ok(!err, JSON.stringify(err)); }; module.exports.executeQueryAndVerify = function (connection, sql, expected, callback, bindArray, normalize) { // Sometimes we may not want to normalize the row first normalize = (typeof normalize !== "undefined" && normalize != null) ? normalize : true; ...
<vulnerable_code> function (row) { // variant assert.deepStrictEqual(row.getColumnValue('C1'), {a: 1}); assert.strictEqual( row.getColumnValueAsString('C1'), JSON.stringify({a: 1})); // object assert.deepStrictEqual(row.getColumnValue('C2'), ...
<vulnerable_code><commit_title>[PATCH] Regression test for<commit_description><fixed_code> # -*- coding: utf-8 -*- from system_tests import CaseMeta, CopyTmpFiles, path, check_no_ASAN_UBSAN_errors class Jp2ImageEncodeJp2HeaderOutOfBoundsRead2(metaclass=CaseMeta): """ Regression test for the bug described in: ...
<vulnerable_code><commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<commit_description>Co-authored-by: Ty Hopp <hopp.ty.c@gmail.com><fixed_code> describe(`webpack loader`, () => { it(`---js frontmatter should not parse by default`, () => { cy.visit(`/js-frontmatter`).waitForRouteC...
<vulnerable_code><commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<commit_description>Co-authored-by: Ty Hopp <hopp.ty.c@gmail.com><fixed_code> exports.createSchemaCustomization = ({ actions }) => { const { createTypes } = actions createTypes(` type Mdx implements Node { ...
<vulnerable_code><commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<commit_description>Co-authored-by: Ty Hopp <hopp.ty.c@gmail.com><fixed_code> import React from "react" import { graphql } from "gatsby" export default function PageRunningGraphqlResolversOnJSFrontmatterTestInputs({ d...
<vulnerable_code> * See #26914 for more info. */ function remarkRequireFilePathPlugin() { return function transformer(tree, file) { if (!file.dirname) { throw new Error("No directory name for this markdown file!") }<commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<comm...
<vulnerable_code> { spaces: 2 } ) }<commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<commit_description>Co-authored-by: Ty Hopp <hopp.ty.c@gmail.com><fixed_code> { spaces: 2 } ) } exports.createSchemaCustomization = ({ actions }) => { const { createTypes } = actions cr...
<vulnerable_code> `"mediaTypes[1]" must be a string`, `"shouldBlockNodeFromTransformation" must have an arity lesser or equal to 1`, `"root" must be a string`, ] const { errors } = await testPluginOptionsSchema(pluginOptionsSchema, { mediaTypes: [1, 2], shouldBlockNodeFromTransform...
<vulnerable_code> } } exports.pluginOptionsSchema = function ({ Joi }) { return Joi.object({ extensions: Joi.array() commonmark: Joi.boolean() .default(false) .description("MDX will be parsed using CommonMark."), }) }<commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by d...
<vulnerable_code> id: createNodeId(`${node.id} >>> Mdx`), node, content, }) createNode(mdxNode)<commit_title>[PATCH] fix(gatsby-plugin-mdx): don't allow JS frontmatter by default<commit_description>Co-authored-by: Ty Hopp <hopp.ty.c@gmail.com><fixed_code> id: createNodeId(`${node.id} >>> Mdx`), ...
<vulnerable_code> methods.splice(methods.indexOf(`paragraph`), 0, `esSyntax`) } const { content } = grayMatter(str) unified() .use(toMDAST, options) .use(esSyntax) const resourceQuery = this.resourceQuery || `` if (isolateMDXComponent && !resourceQuery.includes(`type=component`)) { const { da...
<vulnerable_code> const { findImportsExports } = require(`../utils/gen-mdx`) async function createMdxNodeExtraBabel({ id, node, content }) { let code try { code = await mdx(content) } catch (e) { // add the path of the file to simplify debugging error messages e.message += `${node.absolutePath}: ${e....
<vulnerable_code> // pull classic style frontmatter off the raw MDX body debug(`processing classic frontmatter`) const { data, content: frontMatterCodeResult } = grayMatter(node.rawBody) const content = isolateMDXComponent ? frontMatterCodeResult pathPrefix, ...helpers }) { const { content } = grayMa...
<vulnerable_code> * @param {Object} options options for mdx library * @return {String} JSX source */ module.exports = async function mdxToJsx(source, options) { const { data, content } = grayMatter(source) const code = await mdx(content, options || {}) return `${code} <commit_title>[PATCH] fix(gatsby...
<vulnerable_code> result = self._callFUT(val) self.assertEqual(result, None) class TestUUID(unittest.TestCase): def _callFUT(self, val):<commit_title>[PATCH] Update tests for url validator<commit_description><fixed_code> result = self._callFUT(val) self.assertEqual(result, None) ...
<vulnerable_code> int bitstr_close(void *stream) { int type = *(int*)stream; switch (type) { case BITSTR_MEM : return mbitstr_close(stream); long bitstr_tell(void *stream) { int type = *(int*)stream; if (!stream) return EOF; switch (type) { case BITSTR_MEM : return mbitstr_tell(stream); ...
<vulnerable_code> } else { /* From RFC6265 - Section 4.1.1 - Syntax * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E * ; US-ASCII characters excluding CTLs, * ; whitespa...
<vulnerable_code> new Param("A= 1; B=2; C=3", "A=1", "B=2", "C=3"), new Param("A=\"1; B=2\"; C=3", "C=3"), new Param("A=\"1; B=2; C=3"), new Param("A=\"1 B=2\"; C=3", "A=1 B=2", "C=3"), // Why should A be rejected? Shouldn't it be A=<1 B=2>? new Param("A=\"\"1;...
<vulnerable_code> context->bgr = FALSE; context->maxWidth = PLANAR_ALIGN(width, 4); context->maxHeight = PLANAR_ALIGN(height, 4); context->maxPlaneSize = context->maxWidth * context->maxHeight; context->nTempStep = context->maxWidth * 4; free(context->planesBuffer); free(context->pTempData);<commit_title>[PATCH] ...
<vulnerable_code> int avi_parse_input_file(avi_t *AVI, int getIndex) { int i, rate, scale, idx_type; s64 n; unsigned char *hdrl_data; u64 header_offset=0; int hdrl_len=0; n -= 4; if(strnicmp(data,"hdrl",4) == 0) { hdrl_len = (u32) n; hdrl_data = (unsigned char *) gf_malloc((u32)n); if(hdrl_da...
<vulnerable_code> unsigned char *group4; status=MagickTrue; write_info=CloneImageInfo(image_info); (void) CopyMagickString(write_info->filename,"GROUP4:",MagickPathExtent); (void) CopyMagickString(write_info->magick,"GROUP4",MagickPathExtent); group4_image=CloneImage(inject_image,0,0,MagickTrue,exceptio...
<vulnerable_code> /** * Number of elements remaining in the current complex structure (if any), * when writing defined-length Arrays, Objects; marker {@link #INDEFINITE_LENGTH} * otherwise. */ protected int _currentRemainingElements = INDEFINITE_LENGTH;<commit_title>[PATCH] Fix eager allocat...
<vulnerable_code> private final static double MATH_POW_2_10 = Math.pow(2, 10); private final static double MATH_POW_2_NEG14 = Math.pow(2, -14); /* /********************************************************** /* Configuration } } private int _readAndWriteBytes(OutputStream out, int to...
<vulnerable_code><commit_title>[PATCH] Fix eager allocation aspect of #186<commit_description><fixed_code> package com.fasterxml.jackson.dataformat.cbor; import java.io.ByteArrayOutputStream; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml....
<vulnerable_code>package com.fasterxml.jackson.dataformat.cbor.failing; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.cbor....
<vulnerable_code> // growarray. Add the character in the next round. if (ga_grow(&gap, IOSIZE) == FAIL) return (char_u *)"[failed]"; STRCPY(gap.ga_data, IObuff); gap.ga_len = (int)STRLEN(IObuff); }<commit_title>[PATCH] patch 9.0.0060: accessing uninitialized memory when<commit_description><fixed_...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 59, /**/<commit_title>[PATCH] patch 9.0.0060: accessing uninitialized memory when<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 60, /**/ ...
<vulnerable_code> header.length(), body.length()); _request = header + body; return true; } return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("Error in XmlRpcClient::readH...
<vulnerable_code> return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlR...
<vulnerable_code> return false; // Error } } return true; } bool XmlRpcSocket::nbWrite(int fd, const std::string& s, int *bytesSoFar) { int nToWrite = int(s.length()) - *bytesSoFar; char *sp = const_cast<char*>(s.c_str()) + *bytesSoFar; bool wouldBlock = false;<commit_title>[PATCH] Trap for overly...
<vulnerable_code>std::string XmlRpcUtil::parseTag(const char* tag, std::string const& xml, int* offset) { if (*offset >= int(xml.length())) return std::string(); size_t istart = xml.find(tag, *offset); if (istart == std::string::npos) return std::string(); bool XmlRpcUtil::findTag(const char* tag, std::string c...
<vulnerable_code>#include <stdlib.h> #include <string> #include "xmlrpcpp/XmlRpcValue.h" #include "xmlrpcpp/XmlRpcException.h" #include <gtest/gtest.h> EXPECT_EQ("Now is the time <&", ss.str()); } TEST(XmlRpc, testDateTime) { // DateTime int offset = 0;<commit_title>[PATCH] Trap for overly large input to XmlR...
<vulnerable_code> "<methodCall><methodName>DoEmpty</methodName>\r\n" "</methodCall>\r\n", a._request); } // Test generateHeader() "Date: Mon, 30 Oct 2017 22:28:12 GMT\r\n" "Content-type: text/xml\r\n" ...
<vulnerable_code> "bla", "--ca-bundle", "yay", "--no-render", "--login-cert", "puc", "--login-cert-key", assert set(kwargs) == { "base_path", "ca_bundle", "render", "login_cert", "login_cert_ke...
<vulnerable_code>import itertools import pytest from vault_cli import client, exceptions, testing def test_get_client(mocker): ({"a": {"value": "b"}}, {"value": "b"}), # Secret not a string ({"a": {"value": ["yay"]}}, {"value": ["yay"]}), # Secret is a template without variable expan...
<vulnerable_code> help="When activated, you can't overwrite a secret without " 'passing "--force" (in commands "set", "mv", "cp", etc)', ) @click.option( "--render/--no-render", default=settings.DEFAULTS.render, help="Render templated values", ) @click.option( "--umask", callback=click_octal,...
<vulnerable_code>import json import logging import pathlib from typing import Dict, Iterable, List, Optional, Set, Tuple, Type, Union, cast import hvac # type: ignore import jinja2 logger = logging.getLogger(__name__) JSONRecursive = Union[types.JSONValue, utils.RecursiveValue] JSONDictRecursive = Dict[str, JSONRec...
<vulnerable_code>import re from typing import Dict, Mapping, NoReturn, Optional, Sequence from vault_cli import client, exceptions logger = logging.getLogger(__name__) return envvar_name def _make_env_value(value: client.JSONRecursive) -> str: if isinstance(value, str): return value return json...
<vulnerable_code> verify = True ca_bundle = None safe_write = False render = True @staticmethod def _as_dict():<commit_title>[PATCH 1/2] Remove templated secrets<commit_description><fixed_code> verify = True ca_bundle = None safe_write = False @staticmethod def _as_dict():
<vulnerable_code> return dict_obj class RecursiveValue: def __init__(self, name: str): self.name = name def __str__(self) -> str: return f'<recursive value "{self.name}">' def __getitem__(self, key: str) -> str: return str(self) def extract_error_messages(exc: BaseException)...
<vulnerable_code> help="When activated, you can't overwrite a secret without " 'passing "--force" (in commands "set", "mv", "cp", etc)', ) @click.option( "--umask", callback=click_octal, (including VAULT_CLI_PASSWORD and VAULT_CLI_TOKEN). """ kwargs.pop("config_file") set_verbosity(verbo...
<vulnerable_code> r'{key}=********'.format(key=key) ) # Answer files contain passwords for key in ( 'OVESETUP_CONFIG/adminPassword', 'OVESETUP_CONFIG/remoteEngineHostRootPassword', 'OVESETUP_DWH_DB/password', 'OVESETUP_DB/passwo...
<vulnerable_code> /* * Natural Sort algorithm for Javascript - Version 0.8 - Released under MIT license * Author: Jim Palmer (based on chunking idea from Dave Koelle) */ module.exports = function( a , b ) { var re = /(^([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)?$|^0x[\da-fA-F]+$|\d+)/g , sre = /^\s+|\s+$/g , /...
<vulnerable_code> var stringKit = {} ; module.exports = stringKit ; <commit_title>[PATCH] Brand new .naturalSort() code, it was previously borrowed<commit_description><fixed_code> const stringKit = {} ; module.exports = stringKit ;
<vulnerable_code> describe( "Misc" , () => { it( ".resize()" , () => { expect( string.resize( 'bobby' , 8 ) ).to.be( 'bobby ' ) ; } ) ; it( ".naturalSort()" , () => { expect( [ 'one' , 'two' , 'three' ].sort( string.naturalSort ) ).to.equal( [ 'one' , 'three' , 'two' ] ) ; expect( [ 'one' , 'two' , 'Thre...
<vulnerable_code> else: ansible_role = None data = {} data['uuid'] = result._task._uuid data['session'] = self.session<commit_title>[PATCH] removing args from task_fields as it can contain sensitive<commit_description><fixed_code> else: ansible_role = None...
<vulnerable_code> /* * Get the completed text by inferring the case of the originally typed text. */ static char_u * ins_compl_infercase_gettext( char_u *str, int actual_len, int actual_compl_length, int min_len) { int *wca; // Wide character array. char_u *p; int i, c; int has_lower = FA...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 44, /**/<commit_title>[PATCH] patch 9.0.0045: reading past end of completion with a long<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 45, ...
<vulnerable_code>import stat import shutil import gettext from gi.repository import GLib, Gio, GObject def __init__(self, op): super(FileReceiver, self).__init__() self.save_path = prefs.get_save_path() self.save_path_file = Gio.File.new_for_path(self.save_path) self.op = op ...
<vulnerable_code> public String getPasswordValue(Object o) { if (o==null) return null; if (o instanceof Secret) return ((Secret)o).getEncryptedValue(); return o.toString(); } <commit_title>[PATCH] [FIXED SECURITY-93] PasswordParameterDefinition should serve<commit_description><fixed...
<vulnerable_code>import org.kohsuke.stapler.DataBoundConstructor; import hudson.Extension; import hudson.util.Secret; /** * Parameter whose value is a {@link Secret} and is hidden from the UI. return Secret.toString(defaultValue); } // kept for backward compatibility public void setDefaultValue(S...
<vulnerable_code><commit_title>[PATCH] [FIXED SECURITY-93] PasswordParameterDefinition should serve<commit_description><fixed_code> /* * The MIT License * * Copyright 2013 Jesse Glick. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation ...
<vulnerable_code> break; w = DIV2(w); h = DIV2(h); } } return(MagickTrue); break; w = DIV2(w); h = DIV2(h); } } return(MagickTrue);<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/issues/867<commit_description><fixed_code> ...
<vulnerable_code> { const ECP::Field& field = m_ecp.GetField(); const FieldElement& b = m_ecp.m_b; // Gyrations attempt to maintain constant-timeness // We need either (P.x, P.y, 1) or (0, 1, 0). X3 = field.Multiply(X3, inv); Y3 = field.Multiply(Y3, inv); // More gyrations ECP::Point result(X3*Z3.NotZer...
<vulnerable_code> isGitHubShorthand(giturl) ? 'github:' + giturl : giturl ) var parsed = parseGitUrl(url) var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) var matches = Object.keys(gitHosts).map(function (gitHostName) { try { var gitHos...
<vulnerable_code># under the License. from __future__ import annotations import pytest from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP class TestConnection(TestConnectionEndpoint): def test_should_respond_200(self): payload = {"connection_id": "test-connection-id", "conn_type": "sqlite"...
<vulnerable_code> import io import json import re import shlex import warnings def setup_class(self): clear_db_connections() @mock.patch("airflow.providers.http.hooks.http.HttpHook.test_connection") def test_cli_connections_test_success(self, mock_test_conn): """Check that successful connec...
<vulnerable_code> for (let i = 0, l = path.length - 1; i < l; ++i) { const key = path[i]; let child = obj[key]; if (!isObject(child)) { function zipObject(keys, values) { const out = {}; for (let i = 0, l = keys.length; i < l; ++i) { out[keys[i]] = values[i]; } <commit_title>[PATCH] Security F...
<vulnerable_code> } if (plit->literal_data == NULL) { int len = jvp_dec_number_ptr(n)->digits + 14; plit->literal_data = jv_mem_alloc(len); // Preserve the actual precision as we have parsed it<commit_title>[PATCH] Merge pull request from GHSA-686w-5m7m-54vc<commit_description>decNumberToString calls f...
<vulnerable_code> log_file = checkAjaxInput(log_file) if log_file is not None else log_file if service in ('nginx', 'haproxy', 'apache', 'keepalived'): syslog_server_enable = sql.get_setting('syslog_server_enable') if syslog_server_enable is None or syslog_server_enable == 0:<commit_title>[PATCH] v6.3.6.0<commit...
<vulnerable_code>def create_ssh_cred() -> None: from jinja2 import Environment, FileSystemLoader user_group = roxywi_common.get_user_group() name = common.checkAjaxInput(form.getvalue('new_ssh')) name = f'{name}_{user_group}' enable = common.checkAjaxInput(form.getvalue('ssh_enable')) group = common.checkAjaxInp...
<vulnerable_code> }); }); function confirmAjaxAction(action, service, id) { $( "#dialog-confirm" ).dialog({ resizable: false, height: "auto", width: 400, modal: true, title: "Are you sure you want to "+ action + " " + id + "?", buttons: { "Sure": function() { $( this ).dialog( "close" ); if(serv...
<vulnerable_code><commit_title>[PATCH] chore: expose static resources explicitly<commit_description>ServletContext resources are not available anymore via HTTP after vaadin/osgi#50. So they should be exposed explicitly via resource service<fixed_code> package com.example.starter.base.osgi; import org.osgi.service.comp...
<vulnerable_code> */ var InputToolTip = function() { WrappedElement.call(this); }; inherits(InputToolTip, WrappedElement); this._element.addClass('dimmed'); }; InputToolTip.prototype.setClickHandler = function(handler) { this._clickHandler = handler; }; var element = this.makeElement('div'); this....