text stringlengths 79 3.72M |
|---|
<vulnerable_code> break;
}
return true;
}
else if (std::isspace(ch))
void Messageheader::Parser::checkHeaderspace(unsigned chars) const
{
if (headerdataPtr + chars >= header.rawdata + sizeof(header.rawdata))
throw HttpError(HTTP_REQUEST_ENTITY_TOO_LARGE, "header too ... |
<vulnerable_code> * @returns {Array.<string>} a compiled object
*/
date.compile = function (formatString) {
var re = /\[([^\[\]]*|\[[^\[\]]*\])*\]|([A-Za-z])\2+|\.{3}|./g, keys, pattern = [formatString];
while ((keys = re.exec(formatString))) {
pattern[pattern.length] = keys[0]... |
<vulnerable_code>dd:function(a){return this.res.dd[a.getDay()]},Z:function(a){return a.utc?"+0000":/[\+-]\d{4}/.exec(a.toTimeString())[0]},post:function(a){return a}},x={YYYY:function(a){return this.exec(/^\d{4}/,a)},Y:function(a){return this.exec(/^\d{1,4}/,a)},MMMM:function(a){a=this.find(this.res.MMMM,a);a.value++;r... |
<vulnerable_code> struct sock *sk2;
struct alg_sock *ask2;
struct hash_ctx *ctx2;
int err;
err = crypto_ahash_export(req, state);
if (err)
return err;
sk2 = newsock->sk;
ask2 = alg_sk(sk2);
ctx2 = ask2->private;
ctx2->more = 1;
err = crypto_ahash_import(&ctx2->req, state);
if (err) {<commit_title>[PATCH... |
<vulnerable_code> // Evaluate the title only if the document has script rights, otherwise use the raw title.
if (authorizationManager.hasAccess(Right.SCRIPT, document.getContentAuthorReference(),
document.getDocumentReference())) {
title = evaluateT... |
<vulnerable_code>import static org.junit.Assert.assertSame;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
this.mocker.getComponentUnderTest()... |
<vulnerable_code> class NestedSheetIT extends SheetIT
{
}
}<commit_title>[PATCH] XWIKI-20624: Improve title display for modified documents<commit_description><fixed_code>
class NestedSheetIT extends SheetIT
{
}
@Nested
@DisplayName("Script author Tests")
class NestedScriptAuthorIT ex... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20624: Improve title display for modified documents<commit_description><fixed_code>
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* unde... |
<vulnerable_code> streamID min_id = {0, 0}, max_id = {UINT64_MAX, UINT64_MAX};
*edge_id = first ? max_id : min_id;
}
}
/* Adds a new item into the stream 's' having the specified number of<commit_title>[PATCH] Fix memory leak in streamGetEdgeID<commit_description>si is initialized by streamIterator... |
<vulnerable_code> const base64Key2 = btoa(base64Key1)
const bufferKey = new TextEncoder().encode(base64Key2)
console.log({
rawKey,
base64Key1,
base64Key2,
bufferKey,
})
const encryptedKey = await encryptStringAsymmetric(
publicKey,
bufferKey,<commit_title>[PATCH] Remove logs<commit_description>Signed-... |
<vulnerable_code>(function(t){function e(e){for(var i,r,o=e[0],l=e[1],c=e[2],d=0,p=[];d<o.length;d++)r=o[d],Object.prototype.hasOwnProperty.call(n,r)&&n[r]&&p.push(n[r][0]),n[r]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(t[i]=l[i]);u&&u(e);while(p.length)p.shift()();return a.push.apply(a,c||[]),s()}functi... |
<vulnerable_code><commit_title>[PATCH 1/3] Backport writer field fix from 3.6.0<commit_description>https://github.com/getkirby/kirby/pull/3512
https://github.com/getkirby/kirby/pull/3887
https://github.com/getkirby/kirby/pull/3922
https://github.com/getkirby/kirby/pull/3899<fixed_code>
const fs = require("fs");
proces... |
<vulnerable_code> rs.cont_size = isonum_733(rr->u.CE.size);
break;
case SIG('E', 'R'):
ISOFS_SB(inode->i_sb)->s_rock = 1;
printk(KERN_DEBUG "ISO 9660 Extensions: ");
{<commit_title>[PATCH] isofs: Fix unchecked printing of ER records<commit_description>We didn't check length of rock ridge ER records befo... |
<vulnerable_code>/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "user-util.h"
#include "macro.h"
#include "fd-util.h"
#include "dirent-util.h"
#include "chown-recursive.h"
static int chown_one(int fd, const char *name, const struct stat *st, uid_t ui... |
<vulnerable_code>static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
if (clLvalue(s2v(ci->func))->p->is_vararg) {
int nextra = ci->u.l.nextraargs;
if (n <= nextra) {
*pos = ci->func - nextra + (n - 1);
return "(vararg)"; /* generic name for any vararg */
}
}
const char *name... |
<vulnerable_code> return {};
}
const auto version = _account->capabilities().clientSideEncryptionVersion();
QJsonObject metadata{
{"version", version},
{metadataKeyJsonKey, QJsonValue::fromVariant(encryptData(_metadataKey.toBase64()))},
{"checksum", QJsonValue::fromVariant(com... |
<vulnerable_code> tmp = iov_iter_copy_from_user_atomic(page, ii, offset, bytes);
flush_dcache_page(page);
if (!tmp) {
unlock_page(page);
page_cache_release(page);
req->page_descs[req->num_pages].length = tmp;
req->num_pages++;
iov_iter_advance(ii, tmp);
count += tmp;
pos += tmp;
offset += tmp;<... |
<vulnerable_code> constants.API_BASE_PATH + 'settings',
];
// If the route is not one of the authentication required routes
// then we can allow it through.
if(!AUTHENTICATION_REQUIRED_ROUTES.includes(req.path)) {
next();
return;
}<commit_title... |
<vulnerable_code> // balanced parens inclusion (), [], {}, <>
parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g,
};
// http://www.iana.org/assignments/uri-schemes.html
// http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
URI.defaultPorts = {
preventInvalidHostname:... |
<vulnerable_code> idn: false,
punycode: false
}
}
];
<commit_title>[PATCH] fix(parse): remove leading whitespace<commit_description>reported by @p0cas via huntr.dev<fixed_code>
idn: false,
punycode: false
}
}, {
name: 'leading white space',
url: '\t\bhttp:/... |
<vulnerable_code>
var target = pth.resolve(targetPath, maintainEntryPath ? entryName : pth.basename(entryName));
if (item.isDirectory) {
target = pth.resolve(target, "..");
_zip.entries.forEach(function(entry) {
entryName = entry.entryName.toString()... |
<vulnerable_code> Dwarf_Bool targ_is_info = 0;
Dwarf_Off localoff = 0;
int res = 0;
targ_is_info = attr->ar_cu_context->cc_is_info;
memcpy(sig8,attr->ar_debug_ptr,sizeof(*sig8));
res = dwarf_find_die_given_sig8(attr->ar_dbg,
Dwarf_Bool t_is_info = TRUE;
Dwarf_Unsigned t_offset =... |
<vulnerable_code> ret = -EAGAIN;
break;
}
sk_wait_data(sk, &timeo, NULL);
if (signal_pending(current)) {
ret = sock_intr_errno(timeo);<commit_title>[PATCH] tcp: avoid infinite loop in tcp_splice_read()<commit_description>Splicing from TCP socket is vulnerable when a packet with URG flag is
received ... |
<vulnerable_code> if (!buffer) {
return NULL;
}
PyObject *result = PyUnicode_FromWideChar(_Py_normpath(buffer, len), -1);
PyMem_Free(buffer);
return result;
}<commit_title>[PATCH] added _Py_normpathAndSize<commit_description><fixed_code>
if (!buffer) {
return NULL;
}
Py_ss... |
<vulnerable_code> the path, if known. If -1, the first null character will be assumed
to be the end of the path. */
wchar_t *
_Py_normpath(wchar_t *path, Py_ssize_t size)
{
assert(path != NULL);
if (!path[0] || size == 0) {
}
#endif /* MS_WINDOWS */
/* if pEnd is specified, check that. Else, check... |
<vulnerable_code> int64_t length;
njs_array_t *keys;
njs_value_t *key;
njs_object_prop_t *prop;
} njs_json_state_t;
typedef struct {
njs_value_t retval;
njs_uint_t depth;
#define NJS_JSON_MAX_DEPTH 32
... |
<vulnerable_code> njs_str("123"),
1000000 },
{ "for loop 100M",
njs_str("var i; for (i = 0; i < 100000000; i++); i"),
njs_str("100000000"),<commit_title>[PATCH] Fixed JSON.parse() when reviver function is provided.<commit_description>This closes #480 issue on Github.<fixed_code>
njs_st... |
<vulnerable_code> "JSON.parse('[1]', func);"),
njs_str("") },
/* JSON.stringify() */
{ njs_str("JSON.stringify()"),<commit_title>[PATCH] Fixed JSON.parse() when reviver function is provided.<commit_description>This closes #480 issue on Github.<fixed_code>
"JSON.parse('[1]', fu... |
<vulnerable_code> return getLedgerHandle(ledgerId).thenApply(rh -> rh.getLedgerMetadata().toSafeString());
}
CompletableFuture<ReadHandle> getLedgerHandle(long ledgerId) {
CompletableFuture<ReadHandle> ledgerHandle = ledgerCache.get(ledgerId);
if (ledgerHandle != null) {<commit_title>[PA... |
<vulnerable_code> Assert.assertEquals(e.getResponse().getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
}
}
}<commit_title>[PATCH] [Issue 11814] fix pulsar admin method:getMessageById.<commit_description><fixed_code>
Assert.assertEquals(e.getResponse().getStatus(), Response.S... |
<vulnerable_code> prompt: strategy.prompt || undefined,
};
if (strategy.checkState) {
req.session.ssoState = req.csrfToken && req.csrfToken();
opts.state = req.session.ssoState;
}<commit_title>[PATCH] fix: accidental unnecessarily strict conditional that<commit_description><fixed_code>
p... |
<vulnerable_code> format_ner_list,
get_type_hints,
ipython_check,
is_special_typed_parameter,
kaggle_check,
readme_to_html,
sanitize_value_for_csv,
tex2svg,
validate_url,
is_in_or_equal,
)
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"<commit_title>[PATCH] formatting<commit_des... |
<vulnerable_code>from app.module.user.model import UserModel, UserTokenModel
from app.module.user import UserSession
from werkzeug.routing import BaseConverter, ValidationError
from bson.objectid import ObjectId
from bson.errors import InvalidId
from os import path
@login_required
def private_static(filename):
# Ge... |
<vulnerable_code> var len = okeys.length;
return function next() {
var key = okeys[++i];
return i < len ? {value: obj[key], key} : null;
};
}<commit_title>[PATCH] Fix prototype pollution vulnerability<commit_description><fixed_code>
var len = okeys.length;
return function next() {
... |
<vulnerable_code> done();
}, 50);
});
});
context('mapValues', () => {<commit_title>[PATCH] Fix prototype pollution vulnerability<commit_description><fixed_code>
done();
}, 50);
});
it('prototype pollution', (done) => {
... |
<vulnerable_code>
/* xmallocs memory and clears it out */
void*
xcalloc (size_t num, size_t size)
{
size_t res;
if (check_mul_overflow(num, size, &res))
abort();
void *ptr;
ptr = malloc(res);
if (ptr)
{
memset (ptr, '\0', (res));
}
return ptr;
}
/* xcallocs memory but o... |
<vulnerable_code> attr->name = ((type_and_name << 16) >> 16);
attr->len = geti32(in);
/* Allocate an extra byte for the null terminator. */
attr->buf = CHECKED_XCALLOC (unsigned char, attr->len + 1);
(void)getbuf(in, attr->buf, attr->len);
/* Always null terminate, in case the input lacks it,<co... |
<vulnerable_code>
//duplicate our descriptor
movie->LastError = gf_odf_desc_copy((GF_Descriptor *) movie->moov->iods->descriptor, &desc);
if (movie->LastError) return NULL;
if (!useIOD) {
isom_od = (GF_IsomObjectDescriptor *)desc;<commit_title>[PATCH] fixed #1784 (fuzz)<commit_description><fixed_code>
//duplic... |
<vulnerable_code> self.followOriginalHttpMethod = options.followOriginalHttpMethod
}
if (options.allowInsecureRedirect !== undefined) {
self.allowInsecureRedirect = options.allowInsecureRedirect;
}
}
<commit_title>[PATCH] Removed semicolon<commit_description>Co-authored-by: legobeat <109787230+legobeat@use... |
<vulnerable_code> if(channel->rx_buffer.sdu_length == 0) {
/* handle first fragment */
memcpy(&frame_len, &data[0], 2);
memcpy(&channel->rx_buffer.sdu_length, &data[4], 2);
payload_len = frame_len - 2;
memcpy(channel->rx_buffer.sdu, &data[6], payload_len);
channel->rx_buffer.current_index = pa... |
<vulnerable_code>from ansible.module_utils._text import to_bytes, to_native, to_text
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display
display = Display()
display.debug("done with local.exec_command()")
return (p.returncode, stdout, stderr)
def _ensur... |
<vulnerable_code> display.display(u'Unable to remove temporary file {0}'.format(to_text(e)))
except Exception:
pass<commit_title>[PATCH] fixed fetch traversal from slurp (#68720)<commit_description>* fixed fetch traversal from slurp
* ignore slurp result for dest
* fixed naming when ... |
<vulnerable_code> {text: 'ID', width: 40, sortable: true, dataIndex: 'id', hidden: true},
{text: t("published"), width: 40, sortable: true, dataIndex: 'published', hidden: true},
{text: t("path"), flex: 200, sortable: true, dataIndex: 'fullpath'},
{text: t(... |
<vulnerable_code>}
/* SSL password callback.
* Note that this callback seems to be always called from library worker
* thread, e.g: active socket on_read_complete callback, which should have
* already been equipped with race condition avoidance mechanism (should not<commit_title>[PATCH] Update comment in verify_cb... |
<vulnerable_code> DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space
long outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output?
long inlen = sizeof(Jp2BoxHeader) ; // how many bytes have we read from boxBuf?
Jp2BoxHeader* pBox... |
<vulnerable_code>{
struct ext4_inode *raw_inode;
struct ext4_xattr_ibody_header *header;
int error;
raw_inode = ext4_raw_inode(iloc);
header = IHDR(inode, raw_inode);<commit_title>[PATCH] ext4: add more paranoia checking in ext4_expand_extra_isize<commit_description><fixed_code>
{
struct ext4_inode *raw_inode;
... |
<vulnerable_code>{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
/* determine the minimum size of new large inodes, if present */
if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE &&
sbi->s_want_extra_isize == 0) {
sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
... |
<vulnerable_code>#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/x509.h>
#include <algorithm>
#include <array>
return false;
}
/* NOTE(ww): What happens below is a bit dumb: we convert our SpcIndirectDataContent back
* into DER form so that we can unwrap its ASN.1 sequence and pass t... |
<vulnerable_code> ASSERT_STRCASEEQ(checksumstr.c_str(),
"ddc5b39c4292120745eb86a67eaa331032cc05a0dafaf6e28ec9aa0f189c408d");
}<commit_title>[PATCH] src: bump OpenSSL, EKU check (#78)<commit_description>* src: bump OpenSSL, EKU check
Signed-off-by: William Woodruff <william@trailofbits.com>
* READM... |
<vulnerable_code>int ndlz4_compress(const uint8_t *input, int32_t input_len, uint8_t *output, int32_t output_len,
uint8_t meta, blosc2_cparams *cparams) {
BLOSC_UNUSED_PARAM(meta);
uint8_t *smeta;
int32_t smeta_len;
uint8_t meta, blosc2_dparams *dparams) {
BLOSC_UNUSED_P... |
<vulnerable_code>int ndlz8_compress(const uint8_t *input, int32_t input_len, uint8_t *output, int32_t output_len,
uint8_t meta, blosc2_cparams *cparams) {
BLOSC_UNUSED_PARAM(meta);
uint8_t *smeta;
int32_t smeta_len;
uint8_t meta, blosc2_dparams *dparams) {
BLOSC_UNUSED_P... |
<vulnerable_code>{
int i;
int c;
#ifdef USE_ON_FLY_SCROLL
dont_scroll = TRUE; // disallow scrolling here
#ifdef FEAT_EVAL
/*
* Insert the result of an expression.
* Need to save the current command line, to be able to enter
* a new one...
*/
new_cmdpos = -1;
if (c == '=')
... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5147,
/**/<commit_title>[PATCH] patch 8.2.5148: invalid memory access when using expression<commit_description><fixed_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5... |
<vulnerable_code>
this.onDocumentReady = function(){
$('.custom-file-input').on('change',function(){
$(this).next('.custom-file-label').html($(this).val().replace('C:\\fakepath\\', ''));
});
};
<commit_title>[PATCH] Fix file field xss<commit_description><fixed_code>
this.onDocum... |
<vulnerable_code>import xml
from typing import Optional, Any
from defusedxml.minidom import parseString
from pyexpat import ExpatError<commit_title>[PATCH] fix: remove unused imports<commit_description><fixed_code>
from typing import Optional, Any
from defusedxml.minidom import parseString
from pyexpat import ExpatErro... |
<vulnerable_code>/* */
/********************************************************************************/
#include <string.h>
#include "Tpm.h"
}
UINT16
TPM2B_Marshal(TPM2B *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += UINT16_Marshal(&(source->size), buffer, size);
written... |
<vulnerable_code>TPM2B_PROOF_Marshal(TPM2B_PROOF *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM2B_Marshal(&source->b, buffer, size);
return written;
}
STATE_RESET_DATA_VERSION,
STATE_RESET_DATA_MAGIC, 4);
written... |
<vulnerable_code> try:
cursor = conn.cursor()
uid = request.remote_addr
import pdb
pdb.set_trace()
vid = str(int(time.time()*100))
title, optn, l_dsc = parse_req()
optdsc = '|'.join(l_dsc)
optnum = '|'.join(['0']*optn)
sql = "insert into t_vote_info(FUid, FVoteId, FTitle, FOptionNum, \
FOptionDe... |
<vulnerable_code> int err;
if ((unsigned long)e % __alignof__(struct arpt_entry) != 0 ||
(unsigned char *)e + sizeof(struct arpt_entry) >= limit) {
duprintf("Bad offset %p\n", e);
return -EINVAL;
}
duprintf("check_compat_entry_size_and_hooks %p\n", e);
if ((unsigned long)e % __alignof__(struct compat_arp... |
<vulnerable_code> int err;
if ((unsigned long)e % __alignof__(struct ipt_entry) != 0 ||
(unsigned char *)e + sizeof(struct ipt_entry) >= limit) {
duprintf("Bad offset %p\n", e);
return -EINVAL;
}
duprintf("check_compat_entry_size_and_hooks %p\n", e);
if ((unsigned long)e % __alignof__(struct compat_ipt_e... |
<vulnerable_code> int err;
if ((unsigned long)e % __alignof__(struct ip6t_entry) != 0 ||
(unsigned char *)e + sizeof(struct ip6t_entry) >= limit) {
duprintf("Bad offset %p\n", e);
return -EINVAL;
}
duprintf("check_compat_entry_size_and_hooks %p\n", e);
if ((unsigned long)e % __alignof__(struct compat_ip6... |
<vulnerable_code> end = arg;
if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
{
semsg(_(e_trailing_characters_str), end);
return;
}
<commit_title>[PATCH] patch 9.0.2068: [security] overflow in :history<commit_description>Problem: [security] overflow in :history
Solution: Check that value fit... |
<vulnerable_code> {
vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE, NULL);
*str += len;
*num1 = (int)num;
first = TRUE;
}
vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE, NULL);
if (len > 0)
{
*num2 = (int)num;
*str = skipwhite(*str + len);
}
else if (!first) // no number given at ... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2067,
/**/<commit_title>[PATCH] patch 9.0.2068: [security] overflow in :history<commit_description>Problem: [security] overflow in :history
Solution: Check that value fits into int
The get_list_range() function, ... |
<vulnerable_code> cygpath,
expand_path,
is_cygwin_git,
remove_password_if_present,
safer_popen,
stream_copy,
)
Iterator,
List,
Mapping,
Sequence,
TYPE_CHECKING,
TextIO,
Callable[[bytes, "Repo", "DiffIndex"], None],
],
stderr_handler: Union[None, Callable[[... |
<vulnerable_code>)
import subprocess
from git.cmd import handle_process_output
from git.compat import defenc, force_bytes, force_text, safe_decode
from git.exc import HookExecutionError, UnmergedEntriesError
from git.objects.fun import (
traverse_trees_recursive,
tree_to_stream,
)
from git.util import IndexFil... |
<vulnerable_code> IO,
Iterator,
List,
Mapping,
Optional,
Pattern,
Sequence,
return new_cmdline
def _safer_popen_windows(
command: Union[str, Sequence[Any]],
*,
shell: bool = False,
env: Optional[Mapping[str, str]] = None,
**kwargs: Any,
) -> subprocess.Popen:
"""... |
<vulnerable_code>import ddt
from git import Git, refresh, GitCommandError, GitCommandNotFound, Repo, cmd
from git.util import cwd, finalize_process, safer_popen
from test.lib import TestBase, fixture_path, with_rw_directory
def _do_shell_combo(self, value_in_call, value_from_class):
with mock.patch.obje... |
<vulnerable_code>flatten(data,prefix=''){let output={};for(const key in data){let value=data[key];let finalKey=prefix?`${prefix}[${key}]`:key;if(Array.isArray(value)){output=Object.assign(output,this.flatten(value,finalKey));}
else{output[finalKey]=value;}}
return output;}}
exports.Appwrite=Appwrite;Object.defineProper... |
<vulnerable_code>object[prop]=defaults[prop];}
if(!object.selector){throw new Error('View component is missing a selector attribute');}
stock[object.selector]=object;return this;},render:function(element,callback){parse(element,false,callback);element.dispatchEvent(new window.Event('rendered',{bubbles:false}));}}},true... |
<vulnerable_code>import com.dotmarketing.business.PermissionAPI;
import com.dotmarketing.business.Role;
import com.dotmarketing.cms.factories.PublicCompanyFactory;
import com.dotmarketing.common.util.SQLUtil;
import com.dotmarketing.db.HibernateUtil;
import com.dotmarketing.exception.DotDataException;
import com.dotmar... |
<vulnerable_code>import com.dotcms.repackage.org.apache.struts.action.ActionForward;
import com.dotcms.repackage.org.apache.struts.action.ActionMapping;
import com.dotmarketing.business.APILocator;
import com.dotmarketing.common.util.SQLUtil;
import com.dotmarketing.db.DbConnectionFactory;
import com.dotmarketing.porta... |
<vulnerable_code>import com.dotmarketing.business.APILocator;
import com.dotmarketing.business.web.UserWebAPI;
import com.dotmarketing.business.web.WebAPILocator;
import com.dotmarketing.common.util.SQLUtil;
import com.dotmarketing.exception.DotDataException;
import com.dotmarketing.exception.DotRuntimeException;
impor... |
<vulnerable_code> const struct flowi6 *fl6)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct rt6_info *rt = (struct rt6_info *)dst;
if (!dst)
goto out;
/* Yes, checking route validity in not connected
* case is not very simple. Take into account,
* that we do not support routing by source, TOS,<commit_t... |
<vulnerable_code> """
if default is None:
default = self.base_url
parsed = urlparse(url)
if parsed.netloc or not (parsed.path + '/').startswith(self.base_url):
# require that next_url be absolute path within our path<commit_title>[PATCH] protect against chrome mish... |
<vulnerable_code>import com.nexblocks.authguard.service.exceptions.ServiceAuthorizationException;
import com.nexblocks.authguard.service.exceptions.ServiceException;
import com.nexblocks.authguard.service.exceptions.codes.ErrorCode;
import com.nexblocks.authguard.service.model.AccountBO;
import com.nexblocks.authguard.... |
<vulnerable_code> .withIdentifiers(UserIdentifierBO.builder()
.identifier(username)
.type(UserIdentifier.Type.USERNAME)
.build());
final HashedPasswordBO hashedPasswordBO = HashedPasswordBO.builder()
.password... |
<vulnerable_code> TOKEN_EXPIRED_OR_DOES_NOT_EXIST("AT.025"),
TOKEN_GENERATION_FAILED("AT.031"),
ACCOUNT_IS_LOCKED("AT.032"),
GENERIC_AUTH_FAILURE("AT.039"),
UNSUPPORTED_JWT_ALGORITHM("JT.021"),<commit_title>[PATCH] Prevent authentication with inactive identifiers<commit_description><fixed_code>
... |
<vulnerable_code> Long getId(); // only useful for relational DBs
Type getType();
String getIdentifier();
boolean isActive();
enum Type {
USERNAME,<commit_title>[PATCH] Prevent authentication with inactive identifiers<commit_description><fixed_code>
Long getId(); // only useful for relat... |
<vulnerable_code> complex_question = _PROMPT_TEMPLATE.format(question="What is the square root of 2?")
queries = {
_PROMPT_TEMPLATE.format(question="What is 1 plus 1?"): "Answer: 2",
complex_question: "```python\nprint(2**.5)\n```",
_PROMPT_TEMPLATE.format(question="foo"): "foo",
}
... |
<vulnerable_code> .setEndpoint(githubEndpoint)
.setConverter(new JacksonConverter())
.setClient(retrofitClient)
.setLogLevel(RestAdapter.LogLevel.FULL)
.setLog(new Slf4jRetrofitLogger(GithubService.class))
.build()
.create(GithubService.... |
<vulnerable_code>}
const SegmentCommand* Binary::segment_from_offset(uint64_t offset) const {
const auto it_begin = std::begin(offset_seg_);
if (offset < it_begin->first) {
return nullptr;
* ```
* Therefore, we must shift __LINKEDIT by at least 4 * 0x1000 for Mach-O files targeting ARM
*/
LIEF_DEBU... |
<vulnerable_code> * udp datagram
*/
if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) {
skb = sock_alloc_send_skb(sk,
hh_len + fragheaderlen + transhdrlen + 20,
(flags & MSG_DONTWAIT), &err);
skb->protocol = htons(ETH_P_IPV6);
skb->ip_summed = CHECKSUM_PARTIAL;
skb->csum = 0;
}
err = skb_appe... |
<vulnerable_code> goto err;
}
if (cs > CQSPI_MAX_CHIPSELECT) {
dev_err(dev, "Chip select %d out of range.\n", cs);
goto err;
}<commit_title>[PATCH] mtd: spi-nor: Off by one in cqspi_setup_flash()<commit_description>There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the >
should be >=.
Fix... |
<vulnerable_code> unsigned bufferpos ;
const FLAC__Frame *frame ;
FLAC__bool bufferbackup ;
unsigned compression ;
} FLAC_PRIVATE ;
typedef struct
if (pflac->ptr == NULL)
{ /*
** Not sure why this code is here and not elsewhere.
** Removing it causes valgrind errors.
*/
pflac->bufferbackup = SF_TRUE ;
... |
<vulnerable_code> else:
expanded = initial_fragment
return expanded
def _strip_success_message(self, data):<commit_title>[PATCH] Disallow use of remote home directories containing .. in<commit_description><fixed_code>
else:
expanded = initial_fragment
if '..... |
<vulnerable_code>"""
class DerivedActionBase(ActionBase):
TRANSFERS_FILES = False
action_base._low_level_execute_command('ECHO SAME', sudoable=True)
become.build_become_command.assert_called_once_with("ECHO SAME", shell)
class TestActionBaseCleanReturnedData(unittest.TestCase):
def ... |
<vulnerable_code> */
static int pad_basic(bn_t m, int *p_len, int m_len, int k_len, int operation) {
uint8_t pad = 0;
int result = RLC_OK;
bn_t t;
RLC_TRY {
bn_add_dig(m, m, RSA_PAD);
/* Make room for the real message. */
bn_lsh(m, m, m_len * 8);
break;
case RSA_DEC:
case RSA_VER:
/* EB =... |
<vulnerable_code>/*
* Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public SpotProtocolDecoder(Protocol protocol) {
super(protocol);
try {
... |
<vulnerable_code>
PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )
{
int chr = *scanner->curptr;
if (!chr) {
pj_scan_syntax_err(scanner);
return 0;
}
++scanner->curptr;
if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
pj_scan_skip_whitespace(scanner);
}
return ... |
<vulnerable_code> )
asgi_middleware_while_using_starlette_or_fastapi = (
"starlette" in _get_installed_modules() and mechanism_type == "asgi"
)
if asgi_middleware_while_using_starlette_or_fastapi:
logger.warning(<commit_title>[PATCH 2/2] fix extra dependency (... |
<vulnerable_code> "starlite": ["starlite>=1.48"],
"fastapi": ["fastapi>=0.79.0"],
"pymongo": ["pymongo>=3.1"],
"opentelemetry": ["opentelemetry-distro>=0.350b0"],
},
classifiers=[
"Development Status :: 5 - Production/Stable",<commit_title>[PATCH 2/2] fix extra dependency ... |
<vulnerable_code> }
if (data.pushStatistics) {
var request = new XMLHttpRequest();
request.open('GET', Routing.generate('pimcore_admin_index_statistics'));
request.onload = function () {
if (this.status ... |
<vulnerable_code> u64 umin_val, umax_val;
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
smin_val = src_reg.smin_value;
smax_val = src_reg.smax_value;
umin_val = src_reg.umin_value;
if (BPF_CLASS(insn->code) != BPF_ALU64) {
/* 32-bit ALU ops are (32,32)->32 */
coerce_reg_to_size(dst_reg, 4... |
<vulnerable_code> try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setExpandEntityReferences(false);
return factory.newDocumentBuilder();
} catch (ParserConfigurationException exc) {
throw new IllegalArgumentException(exc);<commit_titl... |
<vulnerable_code>
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setExpandEntityReferences(false);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
Document document = documentBuilder.parse(new InputSource(new St... |
<vulnerable_code> try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setExpandEntityReferences(false);
this.xmlDoc = factory.newDocumentBuilder()
.parse(new ByteArrayInputStream(this.xmlString.getBytes(StandardCharsets.UTF_8)));
return xmlDoc;<c... |
<vulnerable_code> @Test(expectedExceptions = {RuntimeException.class})
public void testToMap_with_empty_xmlString() {
WxPayOrderQueryResult result = new WxPayOrderQueryResult();
result.setXmlString(" ");
Map<String, String> map = result.toMap();
System.out.println(map);
}<commit_title>[PATCH] #903 ... |
<vulnerable_code>/* Copyright (c) 2013-2020 VMware, Inc. or its affiliates. All rights reserved. */
package com.rabbitmq.jms.client.message;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
import java.io.ObjectOutputStream;
import java.io.UTFDataFormatException;
... |
<vulnerable_code>
#pragma pack(pop)
#define DS64ChunkFormat "DDDL"
#define WAVPACK_NO_ERROR 0
if (!strncmp (chunk_header.ckID, "ds64", 4)) {
if (chunk_header.ckSize < sizeof (DS64Chunk) ||
!DoReadFile (infile, &ds64_chunk, chunk_header.ckSize, &bcount) ||
bcount... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.