text stringlengths 79 3.72M |
|---|
<vulnerable_code>Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|\w*"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\... |
<vulnerable_code> }
var lineNumberRows = element.querySelector('.line-numbers-rows');
var lineNumberStart = parseInt(element.getAttribute('data-start'), 10) || 1;
var lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1);
<commit_title>[PATCH 2/5] PHP: Added support for PHP 8.0 features (#2... |
<vulnerable_code>!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows"),i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.child... |
<vulnerable_code> nChangePosInOut = -1;
}
// Fill vin
//
// Note how the sequence number is set to non-maxint so that
// the nLockTime set above actually works.
//
// BIP125 defines opt-in... |
<vulnerable_code> return !S_ISDIR(st->st_mode) && st->st_nlink > 1 && dangerous_hardlinks();
}
static int path_set_perms(Item *i, const char *path) {
char fn[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)];
_cleanup_close_ int fd = -1;
struct stat st;
assert(i);
assert(... |
<vulnerable_code>"""
from typing import Optional, Text
from jupyter_server.base.handlers import APIHandler
from jupyter_server.base.zmqhandlers import WebSocketHandler, WebSocketMixin
from jupyter_server.utils import url_path_join as ujoin
from .manager import LanguageServerManager
from .schema import SERVERS_RESPONS... |
<vulnerable_code>import os
import pathlib
import re
from urllib.parse import unquote, urlparse
RE_PATH_ANCHOR = r"^file://([^/]+|/[A-Z]:)"
Special care must be taken around windows paths: the canonical form of
windows drives and UNC paths is lower case
"""
root_uri = pathlib.Path(root_dir).expanduser()... |
<vulnerable_code>from pathlib import Path
import traitlets
from .handlers import add_handlers
from .manager import LanguageServerManager
page_config.update(rootUri=root_uri, virtualDocumentsUri=virtual_documents_uri)
add_handlers(nbapp)
nbapp.io_loop.call_later(0, initialize, nbapp, virtual_documents_uri... |
<vulnerable_code>
from jupyter_server.serverapp import ServerApp
from pytest import fixture
from tornado.httputil import HTTPServerRequest
from tornado.queues import Queue
from tornado.web import Application
class MockHandler(LanguageServersHandler):
_payload = None
def __init__(self):
pass
def f... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-4qhp-652w-c22x<commit_description>* Add auth decorators, add traversal guard
* Fix mocks resolving most test failures;
`test_listeners` still fails not sure how to fix it
* Address review comments
* add tests for (un)authn'd REST and WebSocket hand... |
<vulnerable_code>
import pytest
from ..paths import file_uri_to_path, normalized_uri
WIN = platform.system() == "Windows"
HOME = pathlib.Path("~").expanduser()
assert normalized_uri(root_dir) == expected_root_uri
@pytest.mark.skipif(PY35, reason="can't test non-existent paths on py35")
@pytest.mark.skipif(WIN, ... |
<vulnerable_code> )
@pytest.fixture
def forbidden_shadow_path(tmpdir):
path = Path(tmpdir) / "no_permission_dir"
# no message should be emitted during the first two attempts
assert caplog.text == ""
# a wargning should be emitted on third failure
with caplog.at_level(logging.WARNING):
... |
<vulnerable_code>from tornado.gen import convert_yielded
from .manager import lsp_message_listener
from .paths import file_uri_to_path
from .types import LanguageServerManagerAPI
# TODO: make configurable
initialized = True
path = file_uri_to_path(uri)
editable_file = EditableFile(path)
... |
<vulnerable_code> self.change_version(new_version=version, dry=dry)
def change_version(self, new_version: str, dry: bool):
changelog = CHANGELOG.read_text(encoding="utf-8")
if new_version not in changelog:
raise Exception(<commit_title>[PATCH] Merge pull request from GHSA-4q... |
<vulnerable_code>
if (ptr->size && (ptr->flags & 0x000001)) {
u32 len = (u32) (ptr->size);
ptr->URI = (char*)gf_malloc(sizeof(char)*len);
if (!ptr->URI) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->URI, len);
}
return GF_OK;
}<commit_title>[PATCH] fixed #1879<commit_description><fixed_code>
if (ptr->size... |
<vulnerable_code> long http2MaxHeaderListSize();
/**
* Returns the maximum number of RST frames that are allowed per {@link #http2MaxResetFramesWindowSeconds()}.
*/
@UnstableApi
int http2MaxResetFramesPerWindow();<commit_title>[PATCH] Update<commit_description><fixed_code>
long http2MaxHea... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2135,
/**/<commit_title>[PATCH] patch 8.1.2136: using freed memory with autocmd from fuzzer<commit_description>Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
S... |
<vulnerable_code>#ifdef FEAT_JOB_CHANNEL
entering_window(curwin);
#endif
if (trigger_new_autocmds)
apply_autocmds(EVENT_WINNEW, NULL, NULL, FALSE, curbuf);
if (trigger_enter_autocmds)
#endif
curwin->w_redr_status = TRUE;
#ifdef FEAT_TERMINAL
if (bt_terminal(wp->w_buffer))
// terminal is likely in ... |
<vulnerable_code> struct net *net = sock_net(sk);
struct mr6_table *mrt;
mrt = ip6mr_get_table(net, raw6_sk(sk)->ip6mr_table ? : RT6_TABLE_DFLT);
if (!mrt)
return -ENOENT;
switch (optname) {
case MRT6_INIT:
if (sk->sk_type != SOCK_RAW ||
inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
return -EOPNOTSUPP;
... |
<vulnerable_code> __iotc_free(ptr);
})
#ifndef __aarch64__
IOTC_TT_TESTCASE(
utest__iotc_memory_calloc__num_1__size_max_minus_1,
{<commit_title>[PATCH] Attempting to detected AMD64 hosts<commit_description><fixed_code>
__iotc_free(ptr);
})
#ifndef __amd64__
IOTC_TT_TESTCASE(
utest__iot... |
<vulnerable_code>
@see: L{twisted.web.iweb.IAgent.request}
"""
parsedURI = URI.fromBytes(uri)
try:
endpoint = self._getEndpoint(parsedURI)<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fixed_code>
@see: L{twisted.we... |
<vulnerable_code> self.assertEqual(agent._pool.connected, True)
def test_unsupportedScheme(self):
"""
L{Agent.request} returns a L{Deferred} which fails with<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fixed_code>
self.assertEqua... |
<vulnerable_code> L{Agent.request} raises L{TypeError} when the C{method} argument isn't
L{bytes}.
"""
self.assertRaises(TypeError, self.agent.request, u'GET', b'http://foo.example/')
def test_unsupportedScheme(self):<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.re... |
<vulnerable_code> Issue a new request, given the endpoint and the path sent as part of
the request.
"""
# Create minimal headers, if necessary:
if headers is None:
headers = Headers()
@see: L{twisted.web.iweb.IAgent.request}
"""
if not isinstan... |
<vulnerable_code> self.agent._proxyEndpoint = self.StubEndpoint(oldEndpoint, self)
def test_proxyRequest(self):
"""
L{client.ProxyAgent} issues an HTTP request against the proxy, with the<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fixed... |
<vulnerable_code> author_email="twisted-python@twistedmatrix.com",
maintainer="Glyph Lefkowitz",
maintainer_email="glyph@twistedmatrix.com",
url="http://twistedmatrix.com/",
license="MIT",
long_description="""\
An extensible framework for Python programming, with special focus
# _XOPEN_SO... |
<vulnerable_code> maintainer="Glyph Lefkowitz",
maintainer_email="glyph@twistedmatrix.com",
url="https://twistedmatrix.com/",
license="MIT",
long_description="""\
An extensible framework for Python programming, with special focus<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request ... |
<vulnerable_code>@var notPortedModules: Modules that are not yet ported to Python 3.
"""
import os
import platform
import sys
from distutils.command import build_ext
'Issues': 'https://twistedmatrix.com/trac/report',
},
license="MIT",
long_description="""\
An extensible framework for Python progra... |
<vulnerable_code>
import os
from pkg_resources import parse_requirements
from setuptools.dist import Distribution
import twisted
from twisted.trial.unittest import TestCase
from twisted.python import _setup, filepath
from twisted.python.compat import _PY3
from twisted.python._setup import (
BuildPy3,
getSetu... |
<vulnerable_code> good_ext = ConditionalExtension("whatever", ["whatever.c"],
condition=lambda b: True)
bad_ext = ConditionalExtension("whatever", ["whatever.c"],
condition=lambda b: False)
args = getSetupArgs(extens... |
<vulnerable_code> self.assertIdentical(protocol.response.length, UNKNOWN_LENGTH)
def test_connectionHeaders(self):
"""
The connection control headers are added to the parser's C{connHeaders}<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fi... |
<vulnerable_code> request.requestHeaders.getRawHeaders(b'bAz'), [b'Quux', b'quux'])
def test_tooManyHeaders(self):
"""
L{HTTPChannel} enforces a limit of C{HTTPChannel.maxHeaders} on the<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fi... |
<vulnerable_code>
length = 0
persistent = 1
__header = ''
__first_line = 1
__content = None
# with processing. We'll have sent a 400 anyway, so just stop.
if not ok:
return
self.__header = ''
self.allHeadersReceived()
... |
<vulnerable_code> requestLines = [
b"GET / HTTP/1.0",
b"nospace: ",
b" nospace",
b"space:space",
b" space",
b"spaces: spaces",
self.runRequest(b"\n".join(requestLines), MyRequest, 0)
[request] = processed
self.assert... |
<vulnerable_code> See RFC 7230 section 3.2.4.
"""
processed = []
class MyRequest(http.Request):
def process(self):
processed.append(self)<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fixed_code>
See R... |
<vulnerable_code>from __future__ import division, absolute_import
__metaclass__ = type
from zope.interface import implementer
from twisted.python.compat import networkString
@implementer(IClientRequest)
class Request:
"""
connection, defaults to C{False}.
@type persistent: L{bool}
"... |
<vulnerable_code>from twisted.web.http_headers import Headers
from twisted.logger import Logger
class PartialDownloadError(error.Error):
"""
_completelyDone = True
_specialHeaders = set((b'host', b'user-agent', b'cookie', b'content-length'))
def connectionMade(self):
method = getattr(self.f... |
<vulnerable_code>
from zope.interface.verify import verifyObject
from twisted.trial.unittest import TestCase
from twisted.web import client, error, http_headers
from twisted.web._newclient import RequestNotSent, RequestTransmissionFailed
from twisted.web._newclient import ResponseNeverReceived, ResponseFailed
from twi... |
<vulnerable_code>
from __future__ import division, absolute_import
import os
from errno import ENOSPC
from twisted.web import server, client, error, resource
from twisted.web.static import Data
from twisted.web.util import Redirect
from twisted.internet import reactor, defer, interfaces
from twisted.python.filepath i... |
<vulnerable_code> @ivar counter: increment value used for generating unique sessions ID.
@ivar requestFactory: A factory which is called with (channel)
and creates L{Request} instances. Default to L{Request}.
@ivar displayTracebacks: if set, Twisted internal errors are displayed on
rendered p... |
<vulnerable_code>
optFlags = [
["notracebacks", "n", (
"Do not display tracebacks in broken web pages. Displaying "
"tracebacks to users may be security risk!")],
]
optFlags.append([
else:
site = server.Site(root)
site.displayTracebacks = not config["notrace... |
<vulnerable_code> self.assertIsInstance(resource._originalResource, demo.Test)
class AddHeadersResourceTests(TestCase):
def test_getChildWithDefault(self):<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<commit_description><fixed_code>
self.assertIsInstance(resource._... |
<vulnerable_code> self.assertEqual(request.prePathURL(), b'http://example.com/foo%2Fbar')
def test_processingFailedNoTraceback(self):
"""
L{Request.processingFailed} when the site has C{displayTracebacks} set<commit_title>[PATCH 01/20] Raise TypeError for non-bytes Agent.request method<comm... |
<vulnerable_code> this.ignoreTrailingSlash = opts.ignoreTrailingSlash || false
this.maxParamLength = opts.maxParamLength || 100
this.allowUnsafeRegex = opts.allowUnsafeRegex || false
this.versioning = opts.versioning || acceptVersionStrategy
this.trees = {}
this.routes = []
}
})
const version = opts.ver... |
<vulnerable_code>
const SemVerStore = require('semver-store')
module.exports = {
storage: SemVerStore,
deriveVersion: function (req, ctx) {
return req.headers['accept-version']
}
}<commit_title>[PATCH] Enable versioning on demand (#172)<commit_description><fixed_code>
const SemVerStore = require('semver-sto... |
<vulnerable_code> t.is(err.message, 'Method \'GET\' already declared for route \'/\' version \'1.2.3\'')
}
})<commit_title>[PATCH] Enable versioning on demand (#172)<commit_description><fixed_code>
t.is(err.message, 'Method \'GET\' already declared for route \'/\' version \'1.2.3\'')
}
})
test('Versioning w... |
<vulnerable_code> * Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 2009 by Bill Allombert, Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2015-2017, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
/* On 16-bit-int machines we have to ... |
<vulnerable_code> if (Rows < min_rows()) // need room for one window and command line
Rows = min_rows();
limit_screen_size();
}
/*<commit_title>[PATCH] patch 8.2.5160: accessing invalid memory after changing<commit_description><fixed_code>
if (Rows < min_rows()) // need room for one window and command line... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5159,
/**/<commit_title>[PATCH] patch 8.2.5160: accessing invalid memory after changing<commit_description><fixed_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5160,... |
<vulnerable_code>(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+U4B":function(t,e,n){var i;i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}... |
<vulnerable_code>
# Get a list of available history for a watch by UUID
# curl http://localhost:5000/api/v1/watch/<string:uuid>/history
def get(self, uuid):
"""
@api {get} /api/v1/watch/<string:uuid>/history Get a list of all historical snapshots available for a watch<commit_title>[PATCH] Se... |
<vulnerable_code>
decoder_info->bit_count.super_mode[decoder_info->bit_count.stat_frame_type] += (stream->bitcnt - bit_start);
if (split_flag){
int new_size = size/2;
TEMPLATE(process_block_dec)(decoder_info,new_size,yposY+0*new_size,xposY+0*new_size,sub);
TEMPLATE(process_block_dec)(decoder_info,new_s... |
<vulnerable_code> decoder_info->width = get_flc(16, stream);
decoder_info->height = get_flc(16, stream);
decoder_info->log2_sb_size = get_flc(3, stream);
decoder_info->pb_split = get_flc(1, stream);
decoder_info->tb_split_enable = get_flc(1, stream);
decoder_info->max_num_ref = get_flc(2, stream) + 1;<commit... |
<vulnerable_code> conn.qLogger->addTransportStateUpdate(kDerivedOneRttWriteCipher);
}
QUIC_TRACE(fst_trace, conn, "derived 1-rtt write cipher");
CHECK(!conn.oneRttWriteCipher.get());
conn.oneRttWriteCipher = std::move(oneRttWriteCipher);
updatePacingOnKeyEstablished(conn);<commit_title>[PATCH]... |
<vulnerable_code> server->removeObserver(mockObserver.get());
}
TEST_F(QuicServerTransportTest, TestRegisterAndHandleTransportKnobParams) {
int flag = 0;
server->registerKnobParamHandler(<commit_title>[PATCH] Close connection if we derive an extra 1-rtt write cipher<commit_description>Summary: Fixes CVE-2021-2402... |
<vulnerable_code>/*
* Set the integer values corresponding to the string setting of 'vartabstop'.
* "array" will be set, caller must free it if needed.
*/
int
tabstop_set(char_u *var, int **array)
{
int valcount = 1;
int t;
char_u *cp;
if (var[0] == NUL || (var[0] == '0' && var[1] == NUL))
{... |
<vulnerable_code>#endif
#ifdef FEAT_VARTABS
vim_free(curbuf->b_p_vsts_array);
tabstop_set(curbuf->b_p_vsts, &curbuf->b_p_vsts_array);
vim_free(curbuf->b_p_vts_array);
tabstop_set(curbuf->b_p_vts, &curbuf->b_p_vts_array);
#endif
}
buf->b_p_vsts = vim_strsave(p_vsts);
COPY_OPT_SCTX(buf, BV_VST... |
<vulnerable_code> if (errmsg == NULL)
{
int *oldarray = curbuf->b_p_vsts_array;
if (tabstop_set(*varp, &(curbuf->b_p_vsts_array)))
{
if (oldarray)
vim_free(oldarray);
{
int *oldarray = curbuf->b_p_vts_array;
if (tabstop_set(*varp, &(curbuf->b_p_vts_array)))
{
vim_free(oldarray)... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3401,
/**/<commit_title>[PATCH] patch 8.2.3402: invalid memory access when using :retab with<commit_description><fixed_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
... |
<vulnerable_code>import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
@Getter
@Setter
public class MysqlConfiguration extends JdbcConfiguration {
private String driver = "com.mysql.jdbc.Driver";
private String extraParams = "characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKey... |
<vulnerable_code> SafeRepresenter.__init__(self, default_style=default_style,
default_flow_style=default_flow_style)
Resolver.__init__(self)
SafeDumper = Dump
class DangerDumper(Emitter, Serializer, Representer, Resolver):
<commit_title>[PATCH] wtf, how did this typo happen<commit_descri... |
<vulnerable_code> (void) LogMagickEvent(CoderEvent,GetMagickModule(),
" reading image resource blocks - %.20g bytes",(double)
((MagickOffsetType) length));
blocks=(unsigned char *) AcquireQuantumMemory((size_t) length,
sizeof(*blocks));
if (blocks == (unsigned char *) NUL... |
<vulnerable_code> char *in, *out = NULL;
uint16_t str_len;
uint32_t str_offs;
size_t outlen;
int ret = 0;
str_len = le16toh(str_hdr->len);
ret = ntlm_str_convert(ctx->to_oem, in, out, str_len, &outlen);
/* make sure to terminate output string */
out[outlen] = '\0';
done:
if (r... |
<vulnerable_code><commit_title>[PATCH] fix: implement static file handler factory for OSGi (#51)<commit_description>* fix: implement static file handler factory for OSGi
fixes #50<fixed_code>
/**
* Copyright (C) 2020 Vaadin Ltd
*
* This program is available under Commercial Vaadin Developer License
* 4.0 (CVDLv4).... |
<vulnerable_code> VaadinServletContext servletContext = new VaadinServletContext(
event.getServletContext());
AppConfigFactoryTracker tracker = servletContext
.getAttribute(AppConfigFactoryTracker.class);
if (tracker != null) {
tracker.close();
... |
<vulnerable_code>import com.vaadin.flow.di.Lookup;
import com.vaadin.flow.internal.ApplicationClassLoaderAccess;
import com.vaadin.flow.internal.VaadinContextInitializer;
import com.vaadin.flow.server.VaadinContext;
import com.vaadin.flow.server.VaadinServlet;
import com.vaadin.flow.server.VaadinServletContext;
* @sin... |
<vulnerable_code><commit_title>[PATCH] fix: implement static file handler factory for OSGi (#51)<commit_description>* fix: implement static file handler factory for OSGi
fixes #50<fixed_code>
/**
* Copyright (C) 2020 Vaadin Ltd
*
* This program is available under Commercial Vaadin Developer License
* 4.0 (CVDLv4).... |
<vulnerable_code> try {
ServiceReference<?>[] references = bundleContext
.getAllServiceReferences(Servlet.class.getName(), null);
for (ServiceReference<?> reference : references) {
servlets.addAll(handleDestroy(lookup, reference));
}
... |
<vulnerable_code><commit_title>[PATCH] fix: implement static file handler factory for OSGi (#51)<commit_description>* fix: implement static file handler factory for OSGi
fixes #50<fixed_code>
/**
* Copyright (C) 2020 Vaadin Ltd
*
* This program is available under Commercial Vaadin Developer License
* 4.0 (CVDLv4).... |
<vulnerable_code> group_id, requester_user_id, and_exists=True
)
if not group_info:
raise SynapseError(400, "Group does not exist", errcode=Codes.BAD_STATE)
if group_info["join_policy"] != "open":
raise SynapseError(403, "Group is not publicly joinable")
<commi... |
<vulnerable_code> * XPath <code>XPath</code> instance using the singleton {@link
* DocumentFactory}.
* </p>
*
* @param xpathExpression
* is the XPath expression to create
*
* @return a new <code>XPath</code> instance
*
* @throws InvalidXPathException
*... |
<vulnerable_code>import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
/**
* <p>
* <code>SAXHelper</code> contains some helper methods for working with SAX
* and XMLReader objects.
* </p>
*
* @author <a href="mailto:james.strachan@metastuff.com">James Strachan </a>
* @version $Revision: 1.... |
<vulnerable_code>import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
/**
* <code>SAXReader</code> creates a DOM4J tree from SAX parsing events.
*
* The actual SAX parser that is used by this class is configurable so you can
* use your favourite SAX parser if you wish. DOM4J come... |
<vulnerable_code>
if (typeof value === 'object') { // Cannot escape on this value
if (!value) {
return false // it is otherwise falsey
} else if (Array.isArray(value)) {
if (value.length === 0) {
return false // empty arrays are falsey<commit_title>[PATCH] clarify comment<commit_descriptio... |
<vulnerable_code> if (impls == null) {
impls = Collections.emptyList();
}
impls = impls.stream().filter(clazz -> !clazz.equals(serviceImpl))
.collect(Collectors.toList());
if (impls.isEmpty()) {
services.put(serviceType, Collections.singletonList(se... |
<vulnerable_code>import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import com.vaadin.flow.di.LookupInitializer.AppShellPredicateImpl;
import com.vaadin.flow.di.LookupInitializer.ResourceProviderImpl;
import com.va... |
<vulnerable_code>import javax.servlet.WriteListener;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
private void mockWebappResource(ClassLoader mockLoader, String pat... |
<vulnerable_code>Please convert your DAGs to use the WebHdfsHook or downgrade the provider to below 4.*
if you want to continue using it.
If you want to use earlier provider you can downgrade to latest released 3.* version
using `pip install apache-airflow-providers-hdfs==3.2.1` (no constraints)
"""
Please conver... |
<vulnerable_code> AppendImageToList(&images,pyramid_image);
}
}
/*
Write pyramid-encoded TIFF image.
*/
write_info=CloneImageInfo(image_info);
write_info->adjoin=MagickTrue;
status=WriteTIFFImage(write_info,GetFirstImageInList(images));
images=DestroyImageList(images);
write_info=DestroyIma... |
<vulnerable_code>/*
* jsrsasign(all) 10.5.24 (2022-06-04) (c) 2010-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*! CryptoJS v3.1.2 core-fix.js
if(typeof KJUR=="undefined"||!KJUR){KJUR={}}if(typeof KJUR.asn1=="undefined"||!KJUR.asn1){KJUR.asn1={}}if(typeof KJUR.asn1.cades=="undefined"||!KJUR.asn1.cades)... |
<vulnerable_code>/*
* jsrsasign(jwths) 10.5.24 (2022-06-04) (c) 2010-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*! CryptoJS v3.1.2 core-fix.js
/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
*/
var jsonParse=(function(){var e="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\... |
<vulnerable_code>/*
* jsrsasign(rsa) 10.5.24 (2022-06-04) (c) 2010-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*! CryptoJS v3.1.2 core-fix.js
function pkcs1unpad2(g,j){var a=g.toByteArray();var f=0;while(f<a.length&&a[f]==0){++f}if(a.length-f!=j-1||a[f]!=2){return null}++f;while(a[f]!=0){if(++f>=a.len... |
<vulnerable_code>var KJUR;if(typeof KJUR=="undefined"||!KJUR){KJUR={}}if(typeof KJUR.lang=="undefined"||!KJUR.lang){KJUR.lang={}}KJUR.lang.String=function(){};function Base64x(){}function stoBA(d){var b=new Array();for(var c=0;c<d.length;c++){b[c]=d.charCodeAt(c)}return b}function BAtos(b){var d="";for(var c=0;c<b.leng... |
<vulnerable_code>if(typeof KJUR=="undefined"||!KJUR){KJUR={}}if(typeof KJUR.jws=="undefined"||!KJUR.jws){KJUR.jws={}}KJUR.jws.JWS=function(){var b=KJUR,a=b.jws.JWS,c=a.isSafeJSONString;this.parseJWS=function(g,j){if((this.parsedJWS!==undefined)&&(j||(this.parsedJWS.sigvalH!==undefined))){return}var i=g.match(/^([^.]+)\... |
<vulnerable_code>exports.inttobitstr = inttobitstr;
exports.bitstrtobinstr = bitstrtobinstr;
exports.binstrtobitstr = binstrtobitstr;
exports.namearraytobinstr = namearraytobinstr;
exports.extendClass = extendClass;
<commit_title>[PATCH] CVE-2022-25898 Security fix in JWS and JWT validation<commit_description><fixed_co... |
<vulnerable_code>/* base64x-1.1.29 (c) 2012-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*
* base64x.js - Base64url and supplementary functions for Tom Wu's base64.js library
* @fileOverview
* @name base64x-1.1.js
* @author Kenji Urushima kenji.urushima@gmail.com
* @version jsrsasign 10.5.23 base64x... |
<vulnerable_code>/* jws-3.3.11 (c) 2013-2018 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*
* jws.js - JSON Web Signature(JWS) and JSON Web Token(JWT) Class
*
* Copyright (c) 2010-2018 Kenji Urushima (kenji.urushima@gmail.com)
*
* This software is licensed under the terms of the MIT License.
* https://k... |
<vulnerable_code> break;
case MODBUS_FC_WRITE_MULTIPLE_COILS: {
int nb = (req[offset + 3] << 8) + req[offset + 4];
int mapping_address = address - mb_mapping->start_bits;
if (nb < 1 || MODBUS_MAX_WRITE_BITS < nb) {
/* May be the indication has been truncated on reading be... |
<vulnerable_code> self.accessibility.liveRegion = {
$region: "",
speak: function (msg) {
var $msg = $("<div>" + msg + "</div>");
this.$region.html($msg);
},
domListener: function () {
var observer = new MutationObserver(function (mutations) {<commit_title>[PATCH] Fix XSS vulnerability... |
<vulnerable_code> raw_cmd->kernel_data = floppy_track_buffer;
raw_cmd->length = 4 * F_SECT_PER_TRACK;
/* allow for about 30ms for data transport per track */
head_shift = (F_SECT_PER_TRACK + 5) / 6;
/* sanity checking for parameters. */
if (g->sect <= 0 ||
g->head <= 0 ||
g->track <= 0 || g->track > UD... |
<vulnerable_code>function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([a-zA-Z0-9\s]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');<commit_title>[P... |
<vulnerable_code> if not repo:
return super().get_remote_branch(repo)
try:
result = cls._popen(["ls-remote", "--symref", repo, "HEAD"])
except RepositoryException:
report_error(cause="Listing remote branch")
return super().get_remote_branch(repo)
... |
<vulnerable_code> }
public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) {
log.info("Find downloadable presentation for meetingId={} presId={} filename={}", meetingId, presId, presFilename);
File presDir = Util.getPresentationDir(presentationBaseDir, me... |
<vulnerable_code> try:
if request.headers.get('KEY') == self.get_config('api_key'):
return True
elif self.get_config('api_key') in request.host:
return True
await check_permission(request, group)
except (HTTPUnauthorized, HTTPForbidden):... |
<vulnerable_code> passwd = getpwuid(geteuid());
file = filename + 1;
} else {
/* ~user or ~user/path */
char *user;
file = strchr(filename, '/');
if (file == NULL)
file = filename + strlen(filename);
user = malloc(file - filename);
if (!user)
return NULL;
strncpy(user, filename + ... |
<vulnerable_code> size_t a_len = a.nlimbs;
/* 0.03345 is slightly larger than log(2)/(9*log(10)). */
size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
if (c_ptr != NULL)
{
char *d_ptr = c_ptr;<commit_title>[PATCH] vasnp... |
<vulnerable_code> ASSERT (result != NULL);
ASSERT (strcmp (result, "12345") == 0);
ASSERT (length == 5);
if (size < 6)
ASSERT (result != buf);
ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
if (result != buf)<commit_title>[PATCH] vasnprintf: Fix heap memory ov... |
<vulnerable_code> av_bprint_init(bp, 0, -1);
while (zstream.avail_in > 0) {
av_bprint_get_buffer(bp, 1, &buf, &buf_size);
if (!buf_size) {
ret = AVERROR(ENOMEM);
goto fail;
}
zstream.next_out = buf;
zstream.avail_out = buf_size;
ret = infl... |
<vulnerable_code> em.createNativeQuery("ALTER SESSION SET optimizer_mode = FIRST_ROWS").executeUpdate();
}
Sort.SortBuilder builder = Sort.builder();
if (colToSort != null) {
builder.order(Sort.Order.of(sortingDirection, colToSort, lowerSortCol));
}
build... |
<vulnerable_code>
package ch.puzzle.itc.mobiliar.business.deploy.entity;
import static ch.puzzle.itc.mobiliar.business.deploy.entity.DeploymentFilterTypes.QLConstants.*;
public enum DeploymentFilterTypes {
DEPLOYMENT_REASON("Reason", DEPLOYMENT_QL_ALIAS + ".reason", FilterType.ENUM_TYPE, true),
ENVIRONMENT_EX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.