text stringlengths 79 3.72M |
|---|
<vulnerable_code>public class TestConstructorHttpAttack extends RobocodeTestBed {
private boolean messagedInitialization;
private boolean messagedAccessDenied;
@Override
public String getRobotNames() {
messagedInitialization = true;
}
if (out.contains("access denied (java.net.SocketPermission")
|| ... |
<vulnerable_code> */
public class TestHttpAttack extends RobocodeTestBed {
private boolean messagedAccessDenied;
@Override
public String getRobotNames() {
final String out = event.getTurnSnapshot().getRobots()[0].getOutputStreamSnapshot();
if (out.contains("access denied (java.net.SocketPermission")
|| ... |
<vulnerable_code><commit_title>[PATCH] Bug-406: DNS interaction is not blocked by Robocode's<commit_description><fixed_code>
/**
* Copyright (c) 2001-2019 Mathew A. Nelson and Robocode contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse ... |
<vulnerable_code> nfs_fscache_open_file(inode, filp);
return 0;
}
EXPORT_SYMBOL_GPL(nfs_open);
/*
* This function is called whenever some part of NFS notices that<commit_title>[PATCH] Revert "NFSv4: Handle the special Linux file open access<commit_description><fixed_code>
nfs_fscache_open_file(inode, filp);
return... |
<vulnerable_code> return err;
if ((openflags & O_ACCMODE) == 3)
return nfs_open(inode, filp);
/* We can't create new files here */
openflags &= ~(O_CREAT|O_EXCL);<commit_title>[PATCH] Revert "NFSv4: Handle the special Linux file open access<commit_description><fixed_code>
return err;
if ((openflags & O_ACCM... |
<vulnerable_code> len += tlen;
}
if (IS_NOT_NULL(Else)) {
len += SIZE_OP_JUMP;
tlen = compile_length_tree(Else, reg);
if (tlen < 0) return tlen;
len += tlen;
case BAG_IF_ELSE:
{
int cond_len, then_len, jump_len;
Node* cond = NODE_BAG_BODY(node);
... |
<vulnerable_code> // (derivative of #2469)
s.add("com.oracle.wls.shaded.org.apache.xalan.lib.sql.JNDIConnectionPool");
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
}
<commit_title>[PATCH] Fixed #3003<commit_description><fixed_code>
// (derivative of #2469)
s... |
<vulnerable_code> spf.setFeature("http://xml.org/sax/features/external-general-entities", false);
spf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
spf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
spf.setXIncludeAware(false);
// Using... |
<vulnerable_code> for kobo_entry in kobo_entries:
ub.session.delete(kobo_entry)
ub.session_commit()
log.info(u"User {} deleted".format(content.name))
return(_(u"User '%(nick)s' deleted", nick=content.name))
else:
log.warning(_(u"Can't de... |
<vulnerable_code> else:
calibre_db.session.query(db.Data).filter(db.Data.book == book.id).\
filter(db.Data.format == book_format).delete()
calibre_db.session.commit()
except Exception as ex:
log.debug_or_exception(ex)... |
<vulnerable_code>@kobo_auth.route("/generate_auth_token/<int:user_id>")
@login_required
def generate_auth_token(user_id):
host_list = request.host.rsplit(':')
if len(host_list) == 1:
host = ':'.join(host_list)
else:
host = ':'.join(host_list[0:-1])
if host.startswith('127.') or host.lowe... |
<vulnerable_code>
$("#modal_kobo_token")
.on("show.bs.modal", function(e) {
var $modalBody = $(this).find(".modal-body");
// Prevent static assets from loading multiple times<commit_title>[PATCH] Kobo sync token is now also created if accessed from<commit_description><fixed_code>
... |
<vulnerable_code>#include <errno.h>
/* strftime() */
#include <time.h>
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
#include "rfbssl.h"
0XFFFFFFFF, i.e. SIZE_MAX for 32-bit systems. On 64-bit systems, a length of 0XFFFFFFFF
will safely be allocated since this check will never trigger and malloc() can digest lengt... |
<vulnerable_code> {
// The ICC profile name can vary from 1-79 characters.
uint32_t iccOffset = 0;
while (iccOffset < 80 && iccOffset < dataOffset) {
const byte* profileName = cdataBuf.pData_ + iccOffset;
... |
<vulnerable_code><commit_title>[PATCH] Avoid negative integer overflow when `chunkLength == 0`.<commit_description>This fixes #789.
(cherry picked from commit 8cd95e221889e41e9cc153e2cfb5a7b41c7bc7a4)<fixed_code>
import system_tests
class SegvInPngImageReadMetadata(
metaclass=system_tests.CaseMeta):
"""
... |
<vulnerable_code> return elem.getAttribute('height') || elem.clientHeight;
},
"getElemAttr": function (elem, attr) {
return elem.getAttribute('data-' + attr) || elem.getAttribute(attr);
},
"addClickEventToId": function (elemId, func) {
tarteaucitron.addClickEventToElement(document... |
<vulnerable_code>from vantage6.server.model.role import Role
from vantage6.server.model.rule import Rule, Operation, Scope
from vantage6.server.model.base import DatabaseSessionManager
from vantage6.common import logger_name
module_name = logger_name(__name__)
RuleNeed = namedtuple("RuleNeed", ["name", "scope", "opera... |
<vulnerable_code>from vantage6.server.permission import (
Scope as S,
Operation as P,
PermissionManager
)
from vantage6.server.resource import (
with_user_or_node, only_for, with_user, ServicesResources
description="edit any organization")
add(scope=S.ORGANIZATION, operation=P.EDIT,
... |
<vulnerable_code> db.UserPermission.c.user_id == args['user_id']
))
# check if pagination is disabled
paginate = True
if 'no_pagination' in args and args['no_pagination'] == '1':
paginate = False
# paginate results
try:
... |
<vulnerable_code>from vantage6.server.permission import (
Scope as S,
Operation as P,
PermissionManager
)
from vantage6.server.resource import (
with_user,
add = permissions.appender(module_name)
add(S.GLOBAL, P.VIEW,
description='View any user')
add(S.ORGANIZATION, P.VIEW,
d... |
<vulnerable_code>"""
script.save()
script.execute_method()<commit_title>[PATCH] fix: avoid patching QB if already patched<commit_description><fixed_code>
"""
script.save()
script.execute_method()
def test_scripts_all_the_way_down(self):
# why not
script = frappe.get_doc(
doctype="Server Script",
nam... |
<vulnerable_code>
@contextmanager
def patched_qb():
try:
_terms = frappe.qb.terms
frappe.qb.terms = _flatten(frappe.qb.terms)
yield
finally:
frappe.qb.terms = _terms
@lru_cache<commit_title>[PATCH] fix: avoid patching QB if already patched<commit_description><fixed_code>
@contextmanager
def patched_qb():
... |
<vulnerable_code> ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
pixels_info=AcquireVirtualMemory(3*image->columns,image->rows*
sizeof(*pixels));
kernel=(float *) AcquireQuantumMemory(MagickMax(image->rows,image->columns),
GetOpenMPMaximumThreads()*sizeof(*kernel));
if ((pixels_info ... |
<vulnerable_code> for (size_t j = 0; j < e.tags_count; j++) {
MOBIIndexTag t = e.tags[j];
if (t.tagid == INDX_TAGARR_INFL_PARTS_V1) {
for (size_t k = 0; k < t.tagvalues_count - 1; k += 2) {
uint32_t len = t.tagvalues[k];
uint32_t offset = t.tagvalues[k + 1]... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code>
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Base64;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code> class NestedPagePickerIT extends PagePickerIT
{
}
}<commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configur... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the caches
* Only send requests to trusted domains
* Only embed actual images
* Limit responses to 1MB
* Introduce configuration options for timeout, maximum size and if the
feature is... |
<vulnerable_code> */
package org.xwiki.security.authentication;
import org.xwiki.component.annotation.Role;
/**
* Configuration of the authentication properties.
{
return true;
}
}<commit_title>[PATCH] XWIKI-20818: Improve data URI converter<commit_description>* Cache failures
* Properly dispose the ... |
<vulnerable_code> */
package org.xwiki.security.authentication.internal;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.xwiki.configuration.ConfigurationSource;
import org.xwiki.security.authentication.AuthenticationConfiguration;
/**
* Default implementation for {@l... |
<vulnerable_code> *extra = dir_report ? 1 : 0;
extra += PDU_AC_SIZE_SCFP;
#endif /* CONFIG_BT_CTLR_EXT_SCAN_FP */
#if defined(CONFIG_BT_HCI_MESH_EXT)
if (node_rx->hdr.type == NODE_RX_TYPE_MESH_REPORT) {
/* save the directed adv report flag */
*extra = _radio.scanner.chan - 1;
extra++;
sys_put_le32(_radio.tick... |
<vulnerable_code> ## Do one of 2 things: ##
## 1) Install this: https://pypi.python.org/pypi/ssl/ ##
## (It provides ssl support for older Pythons ) ##
## 2) Use the --no-ssl option to allow this insecurity ##
... |
<vulnerable_code>import org.antlr.v4.runtime.TokenFactory;
import org.antlr.v4.runtime.TokenSource;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
/**
* This token source can wrap a lexer and if it asks for more than a maximum number of token... |
<vulnerable_code> if (node->value == value) {
goto beach;
}
free (node->value);
node->value = strdup (value);
if (IS_DIGIT (*value)) {
if (strchr (value, '/')) {
node->i_value = r_num_get (cfg->num, value);<commit_title>[PATCH] Fix #7698 - UAF in r_config_set when loading a dex<commit... |
<vulnerable_code> RBinInfo *info = binobj ? binobj->info: NULL;
if (info) {
int va = info->has_va;
const char * arch = info->arch;
ut16 bits = info->bits;
ut64 baseaddr = r_bin_get_baddr (r->bin);
/* Hack to make baddr work on some corner */
r_config_set (r->config, "asm.arch", arch);
r_config_set_i (r->... |
<vulnerable_code> throw IEX_NAMESPACE::ArgExc ("rawTileData read the wrong tile");
}
}
pixelData = tileBuffer->buffer;
}
catch (IEX_NAMESPACE::BaseExc &e)<commit_title>[PATCH] Fix for #494: validate tile coordinates when doing copyPixels<commit_description><fixed_code>... |
<vulnerable_code> /* We don't want this EOF handler to be called over and over while the
* thread is waiting for a job.
*/
qemuMonitorUnregister(mon);
/* We don't want any cleanup from EOF handler (or any other
* thread) to enter qemu namespace. */<commit_title>[PATCH] qemu: Add missing lock ... |
<vulnerable_code> // and store the offset to the checksum
TableEntry* tableEntry = mTrueTypeInput.GetTableEntry("head");
LongFilePositionType startTableOffset;
OutputStreamTraits streamCopier(&mFontFileStream);
LongFilePositionType endOfStream;
// count is lower
TableEntry* tableEntry = mTrueTypeInput.GetTableE... |
<vulnerable_code> (void) ReadBlobByte(image);
if (EOFBlob(image) != MagickFalse)
ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
colormap=(unsigned char *) NULL;
if (number_colormaps != 0)
{
/*
/*
Allocate RLE pixels.
*/
if (image->matte != MagickFalse)... |
<vulnerable_code> if (x===undefined){
it('cdf('+JSON.stringify(data)+') should throw TypeError', function(){
function bad(){ var f = cdf(data); }
bad.should.throw(/cdf input must be an array of finite numbers, got:/);
});
} else {
it('f('... |
<vulnerable_code>_num: Dict[bytes, str] = {
# dangerous: accepted by Python int()
# unicodedata.category(codepoint) == "Nd"
"\N{mathematical double-struck digit one}".encode("utf-8"): "utf8digit",
# only added for interop tests, refused by Python int()
# unicodedata.category(codepoint) == "No"
"... |
<vulnerable_code> password_caps_lock_hint();
var tz = jstz.determine();
$.cookie('timezone', tz.name(), { path: '/' });
}
function preserve_selected_options(elem) {<commit_title>[PATCH] fixes #10275 - Add secure cookie when in ssl<commit_description><fixed_code>
password_caps_lock_hint();
var tz = jstz.dete... |
<vulnerable_code> addHostId(cid);
else
rmHostId(cid);
$.cookie($.cookieName, JSON.stringify($.foremanSelectedHosts));
toggle_actions();
update_counter();
return false;<commit_title>[PATCH] fixes #10275 - Add secure cookie when in ssl<commit_description><fixed_code>
addHostId(cid);
else
rmHost... |
<vulnerable_code> app = routes.App()
interface = gr.Interface(lambda x: x, "text", "text")
interface.root_urls = {
"https://gradio-tests-test-loading-examples-private.hf.space"
}
app.configure_app(interface)
r = app.build_proxy_request(<commit_title>[PATCH] fix... |
<vulnerable_code> // Fallback for users without a camera or with a camera that can not be
// accessed, but only if audio is meant to be used.
if (error && constraints.audio !== false && constraints.video !== false) {
retryNoVideoCallback(constraints, error);
[stream, error] = await this._startAudioOnly(cons... |
<vulnerable_code> this._webRtc.webrtc.on('localScreenStopped', this._handleLocalScreenStoppedBound)
},
_handleLocalStreamRequested(constraints, context) {
if (context !== 'retry-no-video') {
this.set('localStreamRequestVideoError', null)
}
},
_handleLocalStream(configuration, localStream) {
// Although ... |
<vulnerable_code> // devices). It is just a special case in which starting succeeds with a
// null stream.
if (!constraints.audio && !constraints.video) {
self.emit('localStream', constraints, null)
if (cb) {
return cb(null, null, constraints)
return
}
this.emit('localStreamRequested', constraints, conte... |
<vulnerable_code>import org.opencastproject.security.api.UnauthorizedException;
import org.opencastproject.security.api.UserDirectoryService;
import org.opencastproject.series.api.SeriesService;
import org.opencastproject.serviceregistry.api.ServiceRegistry;
import org.opencastproject.serviceregistry.api.ServiceRegistr... |
<vulnerable_code>import org.apache.commons.lang3.reflect.FieldUtils;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.methods.HttpGet;
import org.easymock.Capture;
import org.easymock.EasyMock;
import ... |
<vulnerable_code>import org.opencastproject.security.api.UnauthorizedException;
import org.opencastproject.security.api.UserDirectoryService;
import org.opencastproject.series.api.SeriesService;
import org.opencastproject.serviceregistry.api.HostRegistration;
import org.opencastproject.serviceregistry.api.ServiceRegist... |
<vulnerable_code>import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Dictionary;
import java.util.HashMap;
import java.util.Hashtable;
OrganizationDirectoryService organizationDirectoryService = EasyMock.createMock(OrganizationDirectoryService.class);
EasyMock.e... |
<vulnerable_code> """
Generate a `ContractFunction` object from an `AnnAssign` node.
Used to create function definitions for public variables.
Arguments
---------<commit_title>[PATCH] clarify ContractFunction.from_AnnAssign<commit_description><fixed_code>
"""
Gen... |
<vulnerable_code>import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Archive implements Closeable {
private static Logger logger = Logger.getLogger(Archive.class.getName());
... |
<vulnerable_code><commit_title>[PATCH] make Archive slightly more robust against corrupt files. Add<commit_description><fixed_code>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information r... |
<vulnerable_code> xclass.addNumberField("replyto", "Reply To", 5, "integer");
String commentPropertyName = "comment";
xclass.addTextAreaField(commentPropertyName, "Comment", 40, 5);
// FIXME: Ensure that the comment text editor is set to its default value after an upgrade. This should b... |
<vulnerable_code>import { gen } from './$utils';
export function esc(value) {
if (typeof value !== 'string') return value;
let last=ESCAPE.lastIndex=0, tmp=0, out='';
while (ESCAPE.test(value)) {
tmp = ESCAPE.lastIndex - 1;<commit_title>[PATCH] break: ensure `esc` always returns a string;<commit_description>- pre... |
<vulnerable_code> assert.type(tempura.esc, 'function');
});
esc('should echo non-string inputs', () => {
// @ts-ignore
assert.is(tempura.esc(), undefined);
assert.is(tempura.esc(null), null);
assert.is(tempura.esc(false), false);
assert.is(tempura.esc(123), 123);
assert.is(tempura.esc(0), 0);
assert.equal(temp... |
<vulnerable_code> {
if (strchr(quote, *s))
{
dlen -= 2;
if (dlen == 0)
break;
*pt++ = '\\';
*pt++ = *s;
}<commit_title>[PATCH] Check for int underflow in imap_quote_string<commit_description><fixed_code>
{
if (strchr(quote, *s))
{
if (dlen < 2)
break;... |
<vulnerable_code> parser_line_counter_t start_line, /**< start line */
parser_line_counter_t start_column) /**< start column */
{
context_p->source_p = context_p->token.lit_location.char_p;
context_p->line = start_line;
context_p->column = s... |
<vulnerable_code><commit_title>[PATCH] Fix PropertyDefinition parsing in ObjectInitializer<commit_description>This patch fixes #3822 and fixes #3823 and fixes #3824.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu<fixed_code>
// Copyright JS Foundation and other contributors, http://js.founda... |
<vulnerable_code>import javax.inject.Inject;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.IsWidget;
import java.util.HashMap;
selectedTaskId = event.getTaskId();
selectedTaskName = event.getTaskName();
view.... |
<vulnerable_code>
#define B64LEN(__x) (((__x + 2) / 3) * 12 / 3)
#define WSHLENMAX 14 /* 2 + sizeof(uint64_t) + sizeof(uint32_t) */
enum {
WEBSOCKETS_VERSION_HIXIE,
typedef int (*wsEncodeFunc)(rfbClientPtr cl, const char *src, int len, char **dst);
typedef int (*wsDecodeFunc)(rfbClientPtr cl, char *dst, int len);
... |
<vulnerable_code> void *pEncryptedDataAndTag, uint32 *pcbEncryptedDataAndTag,
const void *pAdditionalAuthenticationData, size_t cbAuthenticationData
) {
unsigned long long pcbEncryptedDataAndTag_longlong = *pcbEncryptedDataAndTag;
crypto_aead_aes256gcm_encrypt_afternm(
static_cast<unsigned char*>( pEncrypte... |
<vulnerable_code>
/* =========================================== */
void WebPImage::readMetadata()
{
if (io_->open() != 0) throw Error(kerDataSourceOpenFailed, io_->path(), strError());<commit_title>[PATCH] Revert accidental whitespace change.<commit_description><fixed_code>
/* ==============... |
<vulnerable_code> errors = "";
int result = 0;
////////////////////////////////////
// Windows specific code
#ifdef WIN32
WSADATA wsaData;
WSAStartup(MAKEWORD(2, 2), &wsaData);
if (bSearching) {
// search for the body
for (size_t b = 0; bSearching && b... |
<vulnerable_code> }, options)
mp.on('field', (key, value) => {
if (key === '__proto__') {
mp.destroy(new Error('__proto__ is not allowed as field name'))
return
}
if (body[key] === undefined) {
log.debug({ field, filename, encoding, mimetype }, 'parsing part')
files++
eos(f... |
<vulnerable_code> })
})
})<commit_title>[PATCH] Merge pull request from GHSA-qh73-qc3p-rjv2<commit_description><fixed_code>
})
})
})
test('addToBody with constructor field', t => {
t.plan(3)
const fastify = Fastify()
t.teardown(fastify.close.bind(fastify))
const opts = {
addToBody: true,
o... |
<vulnerable_code> })
})
})<commit_title>[PATCH] Merge pull request from GHSA-qh73-qc3p-rjv2<commit_description><fixed_code>
})
})
})
test('should not allow constructor', { skip: process.platform === 'win32' }, function (t) {
t.plan(5)
const fastify = Fastify()
t.teardown(fastify.close.bind(fastify))
... |
<vulnerable_code> if (nargs == 0)
return luaL_argerror(L, 0, "MessagePack pack needs input.");
buf = mp_buf_new(L);
for(i = 1; i <= nargs; i++) {
/* Copy argument i to top of stack for _encode processing;<commit_title>[PATCH] Security: fix Lua cmsgpack library stack overflow.<commit_descript... |
<vulnerable_code> sessionProtocol = getSessionProtocol(uri);
if (server) {
reqTarget = DefaultRequestTarget.createWithoutValidation(
RequestTargetForm.ORIGIN, null, null,
uri.getRawPath(), uri.getRawQuery(), null);
} else {
reqTarge... |
<vulnerable_code> return false;
}
@Override
public Path defaultMultipartUploadsLocation() {
return Paths.get(System.getProperty("java.io.tmpdir") +<commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
M... |
<vulnerable_code> private static final boolean ALLOW_DOUBLE_DOTS_IN_QUERY_STRING =
getValue(FlagsProvider::allowDoubleDotsInQueryString, "allowDoubleDotsInQueryString");
private static final Path DEFAULT_MULTIPART_UPLOADS_LOCATION =
getValue(FlagsProvider::defaultMultipartUploadsLocation... |
<vulnerable_code> return null;
}
/**
* Returns the {@link Path} that is used to store the files uploaded from {@code multipart/form-data}
* requests.<commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
M... |
<vulnerable_code> null,
null,
"*",
null,
null);
* The main implementation of {@link RequestTarget#forServer(String)}.
*/
@Nullable
public static RequestTarget forServer(String reqTarget, boolean allowDoubleDotsInQueryString) {
final R... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code>
package com.linecorp.armeria.server;
import static com.linecorp.armeria.internal.common.ArmeriaHttpUtil.concatPaths;
import static com.linecorp.armeria.internal.server.RouteUtil.ensureAbsolutePath;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import... |
<vulnerable_code>package com.linecorp.armeria.internal.common;
import static com.google.common.base.Strings.emptyToNull;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.Set;
import java.util.stream.Stream;
assertAcce... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code>
package com.linecorp.armeria.server.jetty;
import static java.util.Objects.requireNonNull;
import java.nio.ByteBuffer;
import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.common.HttpResponseWriter;
import com.linecorp.armeria.common.HttpStatus;
import com.linecorp.armeria.co... |
<vulnerable_code>package com.linecorp.armeria.server.jetty;
import static com.linecorp.armeria.internal.common.ArmeriaHttpUtil.toHttp1Headers;
import static java.util.Objects.requireNonNull;
import java.lang.invoke.MethodHandle;
import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.common.HttpR... |
<vulnerable_code>import com.linecorp.armeria.common.HttpHeaderNames;
import com.linecorp.armeria.common.HttpRequest;
import com.linecorp.armeria.common.RequestHeaders;
import com.linecorp.armeria.common.annotation.Nullable;
import com.linecorp.armeria.server.ServiceRequestContext;
ArmeriaServerHttpRequest(ServiceR... |
<vulnerable_code><commit_title>[PATCH] Merge pull request from GHSA-wvp2-9ppw-337j<commit_description>* Remove matrix variables from the path on the server-side
Motivation:
Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).
... |
<vulnerable_code>
import static com.google.common.base.Preconditions.checkArgument;
import static com.linecorp.armeria.internal.common.ArmeriaHttpUtil.toHttp1Headers;
import static java.util.Objects.requireNonNull;
import java.io.File;
return HttpResponse.of(HttpStatus.SERVICE_UNAVAILABLE);
}
... |
<vulnerable_code> http://www.rasip.fer.hr/research/compress/algorithms/fund/lz/lzw.html
and the PDFReference
"""
cW = self.CLEARDICT;
baos=""
while True:
pW = cW;
cW = self.nextCode();
if cW == -1:
... |
<vulnerable_code> # number object OR indirect reference
peek = stream.read(20)
stream.seek(-len(peek), 1) # reset to start
if IndirectPattern.match(peek) != None:
return IndirectObject.readFromStream(stream, pdf)
else:
return NumberObject.readFromStream(str... |
<vulnerable_code> pdfr._decryption_key = decryption_key
# Find the range of pages to merge.
if pages == None:
pages = (0, pdfr.getNumPages())
elif isinstance(pages, PageRange):
pages = pages.indices(pdfr.getNumPages())
for page in self.pages:
... |
<vulnerable_code> def __str__(self):
""" A string like "1:2:3". """
s = self._slice
if s.step == None:
if s.start != None and s.stop == s.start + 1:
return str(s.start)
indices = s.start, s.stop
else:
indices = s.start, s.stop, s.... |
<vulnerable_code> from md5 import md5
else:
from hashlib import md5
import uuid
class PdfFileWriter(object):
this flag is on.
"""
import time, random
if owner_pwd == None:
owner_pwd = user_pwd
if use_128bit:
V = 2
if data.pdf.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.