text stringlengths 79 3.72M |
|---|
<vulnerable_code> cmd = ea.cmd;
if ((*cmd != '$' || starts_with_colon)
&& (starts_with_colon || !(*cmd == '\''
|| (cmd[0] == cmd[1] && (*cmd == '+' || *cmd == '-')))))
{
ea.cmd = skip_range(ea.cmd, TRUE, NULL);
if (ea.cmd > cmd)<commit_title>[PATCH] patch 8.2.4009: reading one byte beyond the end... |
<vulnerable_code>
static void validateExports(Module& module, ValidationInfo& info) {
for (auto& curr : module.exports) {
info.shouldBeTrue(curr->name != "", curr->name, "export name must not be empty");
if (curr->kind == ExternalKind::Function) {
if (info.validateWeb) {
Function* f = module.get... |
<vulnerable_code>
describe('Apple Game Center Auth adapter', () => {
const gcenter = require('../lib/Adapters/Auth/gcenter');
it('validateAuthData should validate', async () => {
// real token is used
const authData = {
id: 'G:1965586982',
salt: 'DzqqrQ==',
bundleId: 'cloud.xtralife.gamec... |
<vulnerable_code>const { Parse } = require('parse/node');
const crypto = require('crypto');
const https = require('https');
const cache = {}; // (publicKey -> cert) cache
function verifyPublicKeyUrl(publicKeyUrl) {
path: url.pathname,
method: 'HEAD',
};
const headers = await new Promise((resolve, reject) ... |
<vulnerable_code> unsigned int vlen;
if (getLongDoubleFromObjectOrReply(c,c->argv[3],&incr,NULL) != C_OK) return;
if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
if (hashTypeGetValue(o,c->argv[2]->ptr,&vstr,&vlen,&ll) == C_OK) {
if (vstr) {<commit_title>[PATCH] do not create... |
<vulnerable_code> printf("%s aborted packet:\n ", dir);
q = " ";
}
nb = pkt->cnt;
p = pkt->buf;
pkt->cnt = 0;
c ^= 0x20;
pkt->esc = 0;
}
pkt->buf[pkt->cnt++] = c;
break;
}
}<commit_title>[PATCH] pppdump: Avoid out-of-range access to packet buffer<commit_des... |
<vulnerable_code> MagickMax(global_colors,256),3UL*sizeof(*global_colormap));
if (global_colormap == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (BitSet((int) flag,0x80) != 0)
{
count=ReadBlob(image,(size_t) (3*global_colors),global_colormap);<commi... |
<vulnerable_code># (multi
# (mload 320/*int128*/)
# (mload (add 320/*buf start*/ (mload 352/*ofst loc*/))))
# thought of the day: it might be nice to have an argument like `sanitize`
# which will add well-formedness checks (clamps) for all inputs.
def lazy_abi_decode(typ, src, pos=None):
if isinstance(typ, (Lis... |
<vulnerable_code>void ecdsa_verify_prepare_legacy(ecdsa_verify_context_t *ctx, const ecc_int256_t *hash, const ecdsa_signature_t *signature) {
ecc_int256_t w, u1, tmp;
ctx->r = signature->r;
ecc_25519_gf_recip(&w, &signature->s);
ecc_25519_work_t s2, work;
ecc_int256_t w, tmp;
ecc_25519_scalarmult(&s2, &... |
<vulnerable_code>/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
transform: {
"\\.(js|jsx|ts|tsx)$": ["@swc/jest", require("./swc.config")],
},
rootDir: "../src",
setupFilesAfterEnv: ["../config/jest-setup.js"],
testMatch: ["**/*.test.js"],
// collectCoverageFrom: ["!client... |
<vulnerable_code><commit_title>[PATCH] fix(providers): add `normalizeIdentifier` to EmailProvider<commit_description>* fix(providers): add `normalizeIdentifier` to EmailProvider
* docs: document `normalizeIdentifier`
* fix: allow throwing error from normalizer
* test: add e-mail tests
* chore: log provider id
* te... |
<vulnerable_code> assert(bp->count <= nframes);
memcpy(buffer, bp->data, bp->count * sfmt->bytes_per_frame);
if (!fetch(self, nframes)) {
buffer_t *bbp = &self->buffer[self->nbuffer];
if (bp->count < 2 * LPC_ORDER) {
size_t total = bp->count + bbp->count;
if (bbp->cou... |
<vulnerable_code>from tlsfuzzer.utils.lists import natural_sort_keys
from tlsfuzzer.utils.ordered_dict import OrderedDict
version = 4
def help_msg():
conversations["too long (49-byte) pre master secret"] = conversation
# check if wrong TLS version number is rejected
conversation = Connect(host, port)
... |
<vulnerable_code> if (entry == null) break; // All done!
final String name = entry.getName();
final File outFile = new File(targetFolder, name);
if (entry.isDirectory()) {
outFile.mkdirs();
}<commit_title>[PATCH] vuln-fix: Zip Slip Vulnerability<commit_description>This fixes a Zip-Slip vulnerabi... |
<vulnerable_code>}
static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {
LClosure *f;
StkId fi = index2addr(L, fidx);
api_check(L, ttisLclosure(fi), "Lua function expected");
f = clLvalue(fi);
api_check(L, (1 <= n && n <= f->p->sizeupvalues), "invalid upvalue index");
if (pf) *pf = f... |
<vulnerable_code> uint8_t current_pos, pref_elided, addr_len, compri_addr_len;
const uint8_t new_seg_left = rh->seg_left - 1;
assert(rh->seg_left > 0);
num_addr = (((rh->len * 8) - GNRC_RPL_SRH_PADDING(rh->pad_resv) -
(16 - GNRC_RPL_SRH_COMPRE(rh->compr))) /<commit_title>[PATCH] gnrc_rp... |
<vulnerable_code> TEST_ASSERT_NULL(err_ptr);
}
static void test_rpl_srh_too_many_seg_left(void)
{
static const ipv6_addr_t a1 = IPV6_ADDR1;
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_rpl_srh_dst_multicast),
new_TestFixture(test_rpl_srh_route_multicast),
new_TestFixture(te... |
<vulnerable_code> pktbuf_empty(child)
def test_seg_left_gt_len_addresses(child, iface, hw_dst, ll_dst, ll_src):
# send routing header with no (0) addresses but segleft set to a value
# larger than 0
p = srp1(Ether(dst=hw_dst) / IPv6(dst=ll_dst, src=ll_src) /
assert(p is not None)
assert(ICMPv6P... |
<vulnerable_code> from urllib.error import HTTPError, URLError
from urllib.parse import urlparse
input = input
range = range
map = map
from urllib2 import urlopen, HTTPError, URLError
from urlparse import urlparse
input = raw_input
range = xrange
ConfigParser.read_file = ConfigP... |
<vulnerable_code>
def get_install_requires():
requires = ['psutil>=5.3.0', 'future']
if sys.platform.startswith('win'):
requires.append('bottle')
requires.append('requests')
'paho-mqtt', 'potsdb', 'prometheus_client', 'pyzmq',
'statsd'],
'folders': ... |
<vulnerable_code>{
char *copy = NULL;
/* if object's type is not cJSON_String or is cJSON_IsReference, it should not set valuestring */
if (!(object->type & cJSON_String) || (object->type & cJSON_IsReference))
{
return NULL;
}
{
cJSON *after_inserted = NULL;
if (which < 0)
{
... |
<vulnerable_code>{
char buffer[10];
cJSON *item = cJSON_CreateString("item");
cJSON_InitHooks(NULL);
TEST_ASSERT_NULL(cJSON_Parse(NULL));
cJSON_DeleteItemFromObject(item, NULL);
cJSON_DeleteItemFromObjectCaseSensitive(NULL, "item");
cJSON_DeleteItemFromObjectCaseSensitive(item, NULL);
T... |
<vulnerable_code>
def update_user_tenant(self, context, user_id, user):
"""Update the default tenant."""
# ensure that we're a member of that tenant
tenant_id = user.get('tenantId')
self.identity_api.add_user_to_tenant(context, tenant_id, user_id)<commit_title>[PATCH] Require authz t... |
<vulnerable_code> u_int8_t alen;
int8_t hmac_size;
int8_t failed = 0;
if(packet->payload_packet_len >= 40) {
// skip openvpn TCP transport packet size
if(packet->tcp != NULL)
ovpn_payload += 2;
opcode = ovpn_payload[0] & P_OPCODE_MASK;
printf("[packet_id: %u][opcode: %u][Packet ID: %d]... |
<vulnerable_code>#endif
#include "tls.h"
/*
* rfbClientLog prints a time-stamped message to the log file (stderr).
client->HandleTextChat(client, (int)rfbTextChatFinished, NULL);
break;
default:
buffer=malloc(msg.tc.length+1);
if (!ReadFromRFBServer(client, buffer, m... |
<vulnerable_code>
# ==========================================================================
def generate_script(self, profile: str, system: str, name: str) -> str:
"""
Generate an autoinstall script for the specified profile or system. The system wins over the profile.
:param profil... |
<vulnerable_code>import random
import stat
import time
import xmlrpc.server
from socketserver import ThreadingMixIn
from threading import Thread
from typing import Dict, List, Optional, Tuple, Union
from xmlrpc.server import SimpleXMLRPCRequestHandler
from cobbler import autoinstall_manager, configgen, tftpgen, utils
... |
<vulnerable_code>import os.path
import re
import socket
from typing import Dict, Optional, List
from cobbler import enums, templar
from cobbler import utils
from cobbler.cexceptions import CX
from cobbler.enums import Archs
class TFTPGen:
"""
if what == "profile":
obj = self.api.find_prof... |
<vulnerable_code>RE_HOSTNAME = re.compile(r'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$')
RE_URL_GRUB = re.compile(r"^\((?P<protocol>http|tftp),(?P<server>.*)\)/(?P<path>.*)$")
RE_URL = re.compile(r'^[a-zA-Z\d-]{,63}(\.[a-zA-Z\d-]{,63})*$') # ht... |
<vulnerable_code>
:returns: 0 if there is no file where the information required for this method is saved.
"""
if not os.path.exists("/var/lib/cobbler/.mtime"):
fd = open("/var/lib/cobbler/.mtime", 'w')
fd.write("0")<commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<c... |
<vulnerable_code><commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<commit_description>- The XMLRPC methods generate_script & upload_log_file are not secured
against injection which lead to remote code execution
- Add types to clarify what we expect in the XMLRPC-API<fixed_code>
|
<vulnerable_code> os.remove(json_file)
logger.info("Removed file: " + json_file)
@pytest.fixture(scope="function")
def fk_initrd():
"""<commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<commit_description>- The XMLRPC methods generate_script & upload_log_file are not secured
against in... |
<vulnerable_code><commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<commit_description>- The XMLRPC methods generate_script & upload_log_file are not secured
against injection which lead to remote code execution
- Add types to clarify what we expect in the XMLRPC-API<fixed_code>
"""
This test module tries to auto... |
<vulnerable_code>import base64
import errno
import fcntl
import logging
import os
import random
from cobbler import tftpgen
from cobbler import utils
from cobbler.cexceptions import CX
from cobbler.validate import validate_autoinstall_script_name
EVENT_TIMEOUT = 7 * 24 * 60 * 60 # 1 week
CACHE_TIMEOUT = 10 * 60 # 10... |
<vulnerable_code>from urllib.parse import urlparse
from ipaddress import AddressValueError, NetmaskValueError
from typing import Union
import netaddr
from cobbler import enums, utils
RE_HOSTNAME = re.compile(r'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA... |
<vulnerable_code> :param token: The API-token obtained via the login() method.
:return: 0 on success, 1 on error.
"""
if not hasattr(self.api.settings(), setting_name):
self.logger.warning("Setting did not exist!")
return 1<commit_title>[PATCH 1/7] Safeguard XMLRPC... |
<vulnerable_code> result = remote.modify_setting("auth_token_expiration", 7200, token)
# Assert
assert result == 0
def test_read_autoinstall_template(self, remote, token, create_autoinstall_template, remove_autoinstall_template):
# Arrange<commit_title>[PATCH 1/7] Safeguard XMLRPC a... |
<vulnerable_code>import time
import re
import xmlrpc.server
from typing import Dict, Optional, Union
from xmlrpc.server import SimpleXMLRPCRequestHandler
from socketserver import ThreadingMixIn
from threading import Thread
from typing import Dict, List, Optional, Tuple, Union
from xmlrpc.server import SimpleXMLRPCReque... |
<vulnerable_code>
# Assert --> Let the test pass if the call is okay.
assert True<commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<commit_description>- The XMLRPC methods generate_script & upload_log_file are not secured
against injection which lead to remote code execution
- Add types to clarify... |
<vulnerable_code> :param debug: If the message logged is a debug message.
:param error: If the message logged is an error message.
"""
if not (isinstance(error, bool) or isinstance(debug, bool) or isinstance(msg, str)):
return
# add the user editing the object, if supp... |
<vulnerable_code> """
if not isinstance(object_name, str):
return False
return bool(re.match(item.RE_OBJECT_NAME, object_name))
def validate_obj_id(object_id: str) -> bool:<commit_title>[PATCH 1/7] Safeguard XMLRPC against rce<commit_description>- The XMLRPC methods generate_script & upload_log_fil... |
<vulnerable_code>{
JERRY_ASSERT (func_obj_p != NULL && !ecma_is_lexical_environment (func_obj_p));
switch (ecma_get_object_type (func_obj_p))
{
case ECMA_OBJECT_TYPE_FUNCTION:<commit_title>[PATCH] Add stack-overflow check for general [[Construct]] method of<commit_description><fixed_code>
{
JERRY_ASSERT (f... |
<vulnerable_code> return str.replace(/</g, '<').replace(/>/g, '>')
}
module.exports = function (doc, styleFile) {
var indent = ''
var style = Stylize(styleFile)
})
return forEach(keys, '{', '}', function (key) {
return '<span ' + style('json-markup-key') + '>"' + key + '":</span>... |
<vulnerable_code> fc.last = last;
fc.restore = restore;
fc.messages = mutt_mem_calloc(last - first + 1, sizeof(unsigned char));
#ifdef USE_HCACHE
fc.hc = hc;
#endif<commit_title>[PATCH] Add alloc fail check in nntp_fetch_headers<commit_description><fixed_code>
fc.last = last;
fc.restore = restore;
fc.messa... |
<vulnerable_code> str = gf_bt_get_next(parser, 0);
if (parser->done) break;
/*X3D specific things (ignored for now)*/
if (!strcmp(str, "PROFILE")) gf_bt_force_line(parser);
else if (!strcmp(str, "COMPONENT")) gf_bt_force_line(parser);
else if (!strcmp(str, "META")) gf_bt_force_line(parser);
else if (!strc... |
<vulnerable_code> ent = gf_xml_locate_entity(parser, name, &needs_text);
gf_free(name);
if (!ent && !needs_text) {
xml_sax_append_string(parser, current);
xml_sax_parse(parser, GF_TRUE);
entityEnd[0] = ';';
current = entityEnd;
continue;
}
assert(ent);<commit_title>[PATCH] fixed #2563... |
<vulnerable_code>
protected:
bool certificateError(const QWebEngineCertificateError &certificateError) override;
private:
QUrl _rootUrl;
};
// We need a separate class here, since we cannot simply return the same WebEnginePage object
void WebEnginePage::setUrl(const QUrl &url) {
QWebEnginePage::setUrl(ur... |
<vulnerable_code> return TRUE;
}
static BOOL nsc_rle_decode(BYTE* in, BYTE* out, UINT32 outSize, UINT32 originalSize)
{
UINT32 left = originalSize;
while (left > 4)
{
const BYTE value = *in++;
UINT32 len = 0;
*out++ = value;
left--;
}
else if (value == *in)
{
in++;
if (*in < 0xFF)
{
... |
<vulnerable_code>#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: softmagic.c,v 1.187 2014/05/13 16:42:17 christos Exp $")
#endif /* lint */
#include "magic.h"
file_regerror(&rx, rc, ms);
v = (uint64_t)-1;
} else {
regmatch_t pmatch[1];
#ifndef REG_STARTEND
#define REG_STARTEND 0
size_t l = ms->sea... |
<vulnerable_code> s->tile_offset_y = bytestream2_get_be32u(&s->g); // YT0Siz
ncomponents = bytestream2_get_be16u(&s->g); // CSiz
if (ncomponents <= 0) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid number of components: %d\n",
s->ncomponents);<commit_title>[PATCH] avcodec/jpeg2000de... |
<vulnerable_code>import io.dropwizard.validation.selfvalidating.SelfValidation;
import io.dropwizard.validation.selfvalidating.ViolationCollector;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import uk.org.lidalia.slf4jext.Level;
import uk.org.lidalia.slf4jtest.LoggingEvent;
private st... |
<vulnerable_code>
# Maximum number of root metadata file rotations we should perform in order to
# prevent a denial-of-service (DoS) attack.
MAX_NUMBER_ROOT_ROTATIONS = 2**10<commit_title>[PATCH] reduce the excessive # of rotation checks<commit_description>Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadog... |
<vulnerable_code> report.status = Status.NOTAPPLICABLE
return
if not task.user:
raise PandoraException('The task user is missing. Should not happen, but investigate if it does.')
tasks.append(new_task)
shutil.rmtree(extracted_dir)
# wait for all ... |
<vulnerable_code> # state when listing secret keys; it seems internally only the
# public key is disabled. This makes it hard for us to reason about
# which keys can actually be used, so we compensate...
list_keys = ["--fingerprint"]
for fprint in set(secret_keys):
lis... |
<vulnerable_code> """List Secret GPG Keys"""
ORDER = ('', 0)
SYNOPSIS = (None, 'crypto/gpg/keylist/secret',
'crypto/gpg/keylist/secret', '<address>')
HTTP_CALLABLE = ('GET', )
def command(self):
res = self._gnupg().list_secret_keys()
return self._success("Searched for... |
<vulnerable_code> /* Ack for transmitted data */
pdu_data_rx = (void *)node_rx->pdu_data;
if (pdu_data_rx->nesn != _radio.conn_curr->sn) {
/* Increment serial number */
_radio.conn_curr->sn++;
_radio.conn_curr->slave.latency_enabled = 1U;
}
if (_radio.conn_curr->empty == 0) {
struct radio_pdu_node_tx ... |
<vulnerable_code> if not lxml:
skip = "url preview feature requires lxml"
hijack_auth = True
user_id = "@test:user"
end_content = (
b"<html><head>"
b'<meta property="og:title" content="~matrix~" />'
b'<meta property="og:description" content="hi" />'
b"</head></htm... |
<vulnerable_code> if in_blocklist:
raise HTTPException(403, f"File not allowed: {path_or_url}.")
in_app_dir = utils.abspath(app.cwd) in abs_path.parents
created_by_app = str(abs_path) in set().union(*blocks.temp_file_sets)
in_file_dir = any(
... |
<vulnerable_code> True if path_1 is a descendant (i.e. located within) path_2 or if the paths are the
same, returns False otherwise.
Parameters:
path_1: str or Path (can be a file or directory)
path_2: str or Path (can be a file or directory)
"""
return (abspath(path_2) in abspath(pat... |
<vulnerable_code> sanitize_value_for_csv,
tex2svg,
validate_url,
)
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
):
tex2svg("$$$1+1=2$$$")
assert matplotlib.get_backend() == "svg"<commit_title>[PATCH] add tests<commit_description><fixed_code>
sanitize_value_for_csv,
tex2svg,
v... |
<vulnerable_code> if (changed_mask & MGMT_SETTING_DISCOVERABLE) {
g_dbus_emit_property_changed(dbus_conn, adapter->path,
ADAPTER_INTERFACE, "Discoverable");
store_adapter_info(adapter);
btd_adv_manager_refresh(adapter->adv_manager);
}
static int update_discovery_filter(struct btd_adapter *adapter)
{
struc... |
<vulnerable_code>__author__ = "Daniel Vaz Gaspar"
__version__ = "3.4.2"
from .actions import action # noqa: F401
from .api import ModelRestApi # noqa: F401<commit_title>[PATCH 1/3] docs: adds missing config key FAB_OPENAPI_SERVERS (#1776)<commit_description><fixed_code>
__author__ = "Daniel Vaz Gaspar"
__version__ =... |
<vulnerable_code> "Flask-SQLAlchemy>=2.4, <3",
"Flask-WTF>=0.14.2, <0.15.0",
"Flask-JWT-Extended>=3.18, <4",
"jsonschema>=3.0.1, <4",
"marshmallow>=3, <4",
"marshmallow-enum>=1.5.1, <2",
"marshmallow-sqlalchemy>=0.22.0, <0.27.0",<commit_title>[PATCH 1/3] docs: adds... |
<vulnerable_code>
#define MIN(x,y) (((x)<(y))?(x):(y))
#define ALLOCCHECK(x) { if(!x) { printf("Out of Memory at %s : %i\n", __FILE__, __LINE__); exit(-1); } }
#define SIZECHECK(x) { if ((((char *)d - (char *)data) + x) > size) { printf("Corrupted file detected at %s : %i\n", __FILE__, __LINE__); exit(-1); } }
void ... |
<vulnerable_code> janus_refcount_increase(&room->ref);
if(room->is_private) {
/* Skip private room */
janus_mutex_unlock(&room->mutex);
JANUS_LOG(LOG_VERB, "Skipping private room '%s'\n", room->room_name);
janus_refcount_decrease(&room->ref);
continue;<commit_title>[PATCH] Fixed double unlock w... |
<vulnerable_code>
public PGPSignatureGenerator createSignatureGenerator() {
try {
PGPSignatureGenerator generator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(secretKey.getPublicKey().getAlgorithm(), PGPUtil.SHA1));
generator.init(PGPSignature.BINARY_DOCUMENT, privateKey... |
<vulnerable_code> for i in range(3):
self.assertAllEqual(sess.run(rt[i]), out)
def testFromVariantInvalidParams(self):
rt = ragged_factory_ops.constant([[0], [1], [2], [3]])
batched_variant = rt._to_variant(batched_input=True)<commit_title>[PATCH] [security] Fix failed shape check in RaggedT... |
<vulnerable_code> device_name = RunnableNode('device_name', method=lambda: ([partition_name.device], ''))
fstype = RunnableNode('fstype', method=lambda: (partition_name.fstype, ''))
opts = RunnableNode('opts', method=lambda: (partition_name.opts, ''))
safe_mountpoint = re.sub(r'[\\/]+', '|', mountpoint)
... |
<vulnerable_code>import socket
__VERSION__ = '2.3.1'
__STARTED__ = datetime.datetime.now()
__INTERNAL__ = False
<commit_title>[PATCH] Implemented: Add new disk metrics: maxfile and maxpath (#760)<commit_description><fixed_code>
import socket
__VERSION__ = '2.4.0'
__STARTED__ = datetime.datetime.now()
__INTERNAL__ =... |
<vulnerable_code># tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
# "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
# token = 1*tchar
METHRE: Final[Pattern[str]] = re.compile(r"[!#$%&'*+\-.^_`|~0-9A-Za-z]+")
VERSRE: Final[Pattern[str]] = re.compile(r"HTTP/(\d)\.(\d)")
# FIXME: unrea... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
16,
/**/<commit_title>[PATCH] patch 9.0.0017: accessing memory beyond the end of the line<commit_description>Problem: Accessing memory beyond the end of the line.
Solution: Stop Visual mode when closing a wind... |
<vulnerable_code> */
if (wp->w_buffer != curbuf)
{
other_buffer = TRUE;
win->w_closing = TRUE;
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);<commit_title>[PATCH] patch 9.0.0017: accessing memory beyond the end of the line<commit_description>Problem: Accessing memory beyond the end of t... |
<vulnerable_code> case ST_DATETIME: {
char *tmp;
tmp = emalloc(len + 1);
memcpy(tmp, s, len);
tmp[len] = '\0';
Z_LVAL_P(ent->data) = php_parse_date(tmp, NULL);
/* date out of range < 1969 or > 2038 */
if (Z_LVAL_P(ent->data) == -1) {
Z_TYPE_P(ent->data) = IS_STRING;
Z_STRLEN_P(... |
<vulnerable_code>package com.sun.identity.authentication.modules.nt;
import com.iplanet.am.util.SystemProperties;
import com.sun.identity.shared.Constants;
import com.sun.identity.shared.datastruct.CollectionHelper;
import com.sun.identity.authentication.spi.AMLoginModule;
import com.sun.identity.authentication.spi.Au... |
<vulnerable_code><commit_title>[PATCH] fix NT auth module vulnerability<commit_description><fixed_code>
package com.sun.identity.authentication.modules.nt;
import com.iplanet.am.util.SystemProperties;
import com.sun.identity.authentication.service.AuthD;
import org.forgerock.guice.core.InjectorHolder;
import org.mocki... |
<vulnerable_code> date: new Date('1995-12-17T03:24:00'),
null: null,
array: ['x', 'y', 'z'],
object: {'a': 'b', 'x': 'y'},
};
const data = [
{ key: 'span.kind', value: 'client', expected: 'client' },<commit_title>[PATCH] prettier<commit_description>Signed-off-by: Yuri Shkuro <ysh@meta.com><fixed_... |
<vulnerable_code>from typing import Any, NamedTuple
from urllib import request
from airflow_breeze.global_constants import ALLOWED_ARCHITECTURES, HELM_VERSION, KIND_VERSION, PIP_VERSION
from airflow_breeze.utils.console import Output, get_console
from airflow_breeze.utils.host_info_utils import Architecture, get_host_... |
<vulnerable_code> "placeholders": {},
}
def __init__(self, fs_conn_id: str = default_conn_name):
super().__init__()
conn = self.get_connection(fs_conn_id)
self.basepath = conn.extra_dejson.get("path", "")
self.conn = conn<commit_title>[PATCH 01/12] Add version che... |
<vulnerable_code> conn_type = "package_index"
hook_name = "Package Index (Python)"
def __init__(self, pi_conn_id: str = default_conn_name) -> None:
super().__init__()
self.pi_conn_id = pi_conn_id
self.conn = None
<commit_title>[PATCH 01/12] Add version check for k8s setup venv comman... |
<vulnerable_code>class SubprocessHook(BaseHook):
"""Hook for running processes with the ``subprocess`` module."""
def __init__(self) -> None:
self.sub_process: Popen[bytes] | None = None
super().__init__()
def run_command(
self,<commit_title>[PATCH 01/12] Add version check for k8s ... |
<vulnerable_code> template_fields: Sequence[str] = (
"target_table_name",
"impersonation_chain",
)
def __init__(
batch_size: int = 1000,
location: str | None = None,
impersonation_chain: str | Sequence[str] | None = None,
**kwargs,
) -> None:
super... |
<vulnerable_code>
def bigquery_get_data(
logger: Logger,
dataset_id: str,
table_id: str,
big_query_hook: BigQueryHook,
batch_size: int,
selected_fields: list[str] | str | None,<commit_title>[PATCH 01/12] Add version check for k8s setup venv command (#36673)<commit_description>This command instal... |
<vulnerable_code>
# generate same run id of current task instance
parent_run_id = OpenLineageAdapter.build_task_instance_run_id(
operator.task_id, task_instance.execution_date, task_instance.try_number - 1
)
parent_job = ParentRunMetadata(<commit_title>[PATCH 01/12] Add vers... |
<vulnerable_code> return str(uuid.uuid3(uuid.NAMESPACE_URL, f"{_DAG_NAMESPACE}.{dag_id}.{dag_run_id}"))
@staticmethod
def build_task_instance_run_id(task_id, execution_date, try_number):
return str(
uuid.uuid3(
uuid.NAMESPACE_URL,
f"{_DAG_NAMESPACE}.{t... |
<vulnerable_code> parent_run_id = self.adapter.build_dag_run_id(dag.dag_id, dagrun.run_id)
task_uuid = self.adapter.build_task_instance_run_id(
task.task_id, task_instance.execution_date, task_instance.try_number
)
task_metadata = self.extractor_manager.e... |
<vulnerable_code> :ref:`howto/macros:openlineage`
"""
return OpenLineageAdapter.build_task_instance_run_id(
task_instance.task.task_id, task_instance.execution_date, task_instance.try_number
)
:ref:`howto/macros:openlineage`
"""
job_name = OpenLineageAdapter.build_task_insta... |
<vulnerable_code> "tests/providers/openlineage/extractors/test_manager.py",
"tests/providers/openlineage/plugins/test_adapter.py",
"tests/providers/openlineage/plugins/test_facets.py",
"tests/providers/openlineage/plugins/test_macros.py",
"tests/providers/openl... |
<vulnerable_code> listener, task_instance = _create_listener_and_task_instance()
# Now you can use listener and task_instance in your tests to simulate their interaction.
"""
listener = OpenLineageListener()
listener.log = mock.Mock()
listener.extractor_manager = mock.Mock()
adapter ... |
<vulnerable_code><commit_title>[PATCH 01/12] Add version check for k8s setup venv command (#36673)<commit_description>This command install airflow in k8s venv and in case version of
Python is not yet supported by Airflow, it might fail.
We do not have check it lower-bound because breeze supports the
same minimum versi... |
<vulnerable_code> },
),
job=Job(
namespace="default",
name="job",
facets={"documentation": DocumentationJobFacet(description="description")},
),
),
... |
<vulnerable_code> :param delimiter: the delimiter marks key hierarchy. (templated)
:param aws_conn_id: The connection ID to use when connecting to S3 storage.
:param verify: Whether or not to verify SSL certificates for S3 connection.
:param apply_wildcard: whether to treat '*' as a wildcard or a plain s... |
<vulnerable_code>from copy import deepcopy
from typing import TYPE_CHECKING
from botocore.exceptions import ClientError
from airflow.configuration import conf
from airflow.exceptions import AirflowException
EcsQueuedTask,
EcsTaskCollection,
)
from airflow.utils.state import State
if TYPE_CHECKING:
Ex... |
<vulnerable_code><commit_title>[PATCH 01/12] Add version check for k8s setup venv command (#36673)<commit_description>This command install airflow in k8s venv and in case version of
Python is not yet supported by Airflow, it might fail.
We do not have check it lower-bound because breeze supports the
same minimum versi... |
<vulnerable_code><commit_title>[PATCH 01/12] Add version check for k8s setup venv command (#36673)<commit_description>This command install airflow in k8s venv and in case version of
Python is not yet supported by Airflow, it might fail.
We do not have check it lower-bound because breeze supports the
same minimum versi... |
<vulnerable_code>otel = ["opentelemetry-exporter-prometheus"]
pandas = [
"pandas>=0.17.1",
# Use pyarrow-hotfix to fix https://nvd.nist.gov/vuln/detail/CVE-2023-47248.
# We should remove it once Apache Beam frees us to upgrade to pyarrow 14.0.1
"pyarrow-hotfix",
"pyarrow>=9.0.0",
]
password = [
... |
<vulnerable_code>leveldb = ["plyvel"]
otel = ["opentelemetry-exporter-prometheus"]
pandas = [
"pandas>=0.17.1",
]
password = [
"bcrypt>=2.0.0",<commit_title>[PATCH 01/12] Add version check for k8s setup venv command (#36673)<commit_description>This command install airflow in k8s venv and in case version of
Pyth... |
<vulnerable_code><commit_title>[PATCH] security: fix CVE-2023-48228 (#7666)<commit_description>Signed-off-by: Jens Langhammer <jens@goauthentik.io><fixed_code>
"""Test token view"""
from base64 import b64encode, urlsafe_b64encode
from hashlib import sha256
from django.test import RequestFactory
from django.urls import... |
<vulnerable_code> raise TokenError("invalid_grant")
# Validate PKCE parameters.
if self.code_verifier:
if self.authorization_code.code_challenge_method == PKCE_METHOD_S256:
new_code_challenge = (
urlsafe_b64encode(sha256(self.code_verifier.enco... |
<vulnerable_code> },
items: [
"security/policy",
"security/GHSA-rjvp-29xq-f62w",
"security/CVE-2023-39522",
"security/CVE-2023-36456",<commit_title>[PATCH] security: fix CVE-2023-48228 (#7666)<commit_description>Signed-off-by: Jens L... |
<vulnerable_code>
For example to delete the client XYZ in the realm ABC:
{prog_name} -s http://example.com:8080 -p password client delete -r ABC -c XYZ
where 'client' is the noun, 'delete' is the verb and -r ABC -c XYZ are
arguments to the delete action.
default='admin',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.