text stringlengths 79 3.72M |
|---|
<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 1/2] reduce the excessive # of rotation checks<commit_description>Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@dat... |
<vulnerable_code> # Thoroughly verify it.
self._update_metadata('root', DEFAULT_ROOT_UPPERLENGTH,
version=next_version)
# When we run into HTTP 403 /404 error from ALL mirrors, break out of
# loop, because the next root metadata file is most likely missing.
except tuf.except... |
<vulnerable_code> case BinaryConsts::EncodedType::f64: return f64;
case BinaryConsts::EncodedType::v128: return v128;
case BinaryConsts::EncodedType::AnyFunc:
case BinaryConsts::EncodedType::Func:
throwError("invalid wasm type: " + std::to_string(type));
}
WASM_UNREACHABLE();
}<commit_title>[PA... |
<vulnerable_code> struct dns_addrinfo *info,
void *user_data)
{
struct net_shell_user_data *data = user_data;
const struct shell *shell = data->shell;
bool *first = data->user_data;
if (status == DNS_EAI_CANCELED) {
PR_WARNING("\nTimeout while resolving name.\n");
*first = false;
return;
}
if (st... |
<vulnerable_code> if matches and match.end() > before_start:
continue
# Find the word before the current match
all_before, before_word = text[: match.start()].rsplit(maxsplit=1)
before_start = len(all_before)
before_words[match] = before_word
... |
<vulnerable_code>
int
midi_synth_load_patch(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag)
{
int orig_dev = synth_devs[dev]->midi_dev;
if (!prefix_cmd(orig_dev, 0xf0))
return 0;
if (format != SYSEX_PATCH)
{
/* printk("MIDI Error: Invalid patch format (ke... |
<vulnerable_code>}
static int opl3_load_patch(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag)
{
struct sbi_instrument ins;
return -EINVAL;
}
/*
* What the fuck is going on here? We leave junk in the beginning
* of ins and then check the field pretty close to that beginni... |
<vulnerable_code> return -ENXIO;
fmt = (*(short *) &event_rec[0]) & 0xffff;
err = synth_devs[dev]->load_patch(dev, fmt, buf, p + 4, c, 0);
if (err < 0)
return err;
<commit_title>[PATCH] sound/oss: remove offset from load_patch callbacks<commit_description>Was: [PATCH] sound/oss/midi_synth: prevent unde... |
<vulnerable_code> drawBudgetedBars();
$('.update_ab').on('click', updateAvailableBudget);
$('.create_ab_alt').on('click', createAltAvailableBudget);
$('.budget_amount').on('change', updateBudgetedAmount);
}
return false;
}
function drawBudgetedBars() {
"use strict";
}
});
}
/... |
<vulnerable_code>
static void kvm_vcpu_destroy(struct kvm_vcpu *vcpu)
{
kvm_dirty_ring_free(&vcpu->dirty_ring);
kvm_arch_vcpu_destroy(vcpu);
/*
* No need for rcu_read_lock as VCPU_RUN is the only place that changes<commit_title>[PATCH] KVM: avoid NULL pointer dereference in kvm_dirty_ring_push<commit_description>... |
<vulnerable_code> */
package org.gradle.api.internal.artifacts.repositories;
import org.gradle.api.Action;
import org.gradle.api.Transformer;
import org.gradle.api.artifacts.repositories.AuthenticationContainer;
for (Authentication authentication : configuredAuthentication) {
AuthenticationInternal... |
<vulnerable_code>import org.gradle.api.artifacts.repositories.IvyPatternRepositoryLayout;
import org.gradle.api.artifacts.repositories.RepositoryLayout;
import org.gradle.api.internal.FeaturePreviews;
import org.gradle.api.internal.artifacts.repositories.metadata.RedirectingGradleMetadataModuleMetadataSource;
import or... |
<vulnerable_code>import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
import org.gradle.api.artifacts.repositories.MavenRepositoryContentDescriptor;
import org.gradle.api.internal.FeaturePreviews;
import org.gradle.api.internal.artifacts.repositories.metadata.RedirectingGradleMetadataModuleMetadataSour... |
<vulnerable_code>
xingApi.getAccessToken(requestToken.token, requestToken.secret, req.query.oauth_verifier,
function (error, oauthToken, oauthTokenSecret) {
res.cookie('requestToken', null); // delete cookie
var client = xingApi.client(oauthToken, oauthTokenSecret);
client.get('/v1/u... |
<vulnerable_code> ]
}
// generate correct path
config.sslCAPath.forEach(function (capath, i, array) {
array[i] = path.resolve(appRootPath, capath)<commit_title>[PATCH] Disable PDF export due to security issue<commit_description>As a temporary fix, to keep you and your users save, this patch disables
the PDF expor... |
<vulnerable_code> aPath = ("" + path).split(".");
value = object;
key = aPath.shift();
if (key === 'constructor' && typeof object[key] === 'function') {
return;
}
if (key === '__proto__') {
return;
}
if (aPath.length === 0) {
value = value[key.repla... |
<vulnerable_code> __iotc_free(ptr);
})
IOTC_TT_TESTCASE(
utest__iotc_memory_calloc__num_1__size_max_minus_1,
{
tt_want_ptr_op(NULL, ==, ptr);
__iotc_free(ptr);
})
IOTC_TT_TESTCASE(
utest__iotc_memory_calloc__num_size_max_minus_1__size_1,<commit_title>[PATCH] Attempting to detecte... |
<vulnerable_code> private void migrate86(File dataDir, Stack<Integer> versions) {
}
}<commit_title>[PATCH] Fix the docker sock mount security vulnerability<commit_description><fixed_code>
private void migrate86(File dataDir, Stack<Integer> versions) {
}
private void migrate87(File dataDir, Stack<Integer> versio... |
<vulnerable_code>
private String kubeCtlPath;
@Editable(order=20, description="Optionally specify node selector of the job pods")
public List<NodeSelectorEntry> getNodeSelector() {
return nodeSelector;
public void setRegistryLogins(List<RegistryLogin> registryLogins) {
this.registryLogins = registryLogins;
... |
<vulnerable_code>
private String agentQuery;
@Editable(order=390, name="Agent Selector", placeholder="Any agent",
description="Specify agents applicable for this executor")
@io.onedev.server.web.editable.annotation.AgentQuery(forExecutor=true)
this.agentQuery = agentQuery;
}
@Override
public void execut... |
<vulnerable_code>
private String dockerExecutable;
private static transient volatile String hostInstallPath;
@Editable(order=400, description="Specify login information for docker registries if necessary")
this.registryLogins = registryLogins;
}
@Editable(order=50050, group="More Settings", description="Opt... |
<vulnerable_code> return NULL;
}
Py_ssize_t norm_len;
wchar_t *norm_path = _Py_normpathAndSize(buffer, len, &norm_len);
PyObject *result = PyUnicode_FromWideChar(norm_path, norm_len);
PyMem_Free(buffer);
return result;<commit_title>[PATCH] _Py_normpathAndSize -> _Py_normpath_and_size<comm... |
<vulnerable_code> to be the end of the path. 'normsize' will be set to contain the
length of the resulting normalized path. */
wchar_t *
_Py_normpathAndSize(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize)
{
assert(path != NULL);
if (!path[0] && size < 0 || size == 0) {
_Py_normpath(wchar_t *path, Py_... |
<vulnerable_code> }
f = function(x){
if (typeof(x)!=='number') throw new TypeError('cdf function input must be a number, got:'+typeof(x));
if (Number.isNaN(x)) return x;
var left=0, right=xs.length-1, mid, midval;
if (x<xs[0]) return 0;
if (x>=xs[xs.length-1]) return 1;<commit_title>[PATCH] r... |
<vulnerable_code> */
package com.xpn.xwiki.plugin.scheduler;
import org.codehaus.groovy.control.CompilationFailedException;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.xpn.xwiki.doc.XWikiDocument;
import com.xpn.xwiki.objects.BaseObject;
im... |
<vulnerable_code><commit_title>[PATCH] XWIKI-20852: Improve author checking in GroovyJob<commit_description>* Make sure the metadata author is checked for programming rights.
* Remove the exception printing that prevented any exception from being
thrown.
* Add a unit test.
* Modernize GroovyJob to use less deprecated... |
<vulnerable_code> */
#include "iotc_allocator.h"
#include "iotc_bsp_mem.h"
#include <stdio.h>
extern void* memset(void* ptr, int value, size_t num);
<commit_title>[PATCH] fix stdlib include<commit_description><fixed_code>
*/
#include "iotc_allocator.h"
#include "iotc_bsp_mem.h"
#include <stdlib.h>
extern void* memse... |
<vulnerable_code> void backup(File targetDir, DataSource dataSource, DbProperties dbProperties) throws Exception;
boolean accepts(String url);
}<commit_title>[PATCH] Improve error messages on failure to launch backup process<commit_description>ztexec can include env vars in the error message which we don't want... |
<vulnerable_code>import lombok.extern.slf4j.Slf4j;
import org.apache.tools.ant.types.Commandline;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.ProcessResult;
import org.zeroturnaround.exec.stream.slf4j.Slf4jStream;
import javax.sql.DataSource;
import java.io.File;
import java.io.IOExc... |
<vulnerable_code>import org.apache.tools.ant.types.Commandline;
import org.postgresql.Driver;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.ProcessResult;
import org.zeroturnaround.exec.stream.slf4j.Slf4jStream;
import javax.sql.DataSource;
import java.io.File;
import java.util.ArrayLi... |
<vulnerable_code> while (end - buff >= 16)
{
int64_t* ptr = (int64_t*)buff;
int64_t hdrType = my_ntohll(ptr[0]);
int64_t hdrSize = my_ntohll(ptr[1]) + 16;
if (hdrType == AUPRINFO || hdrType == BITSHVTB || hdrType == BLACKOUT || hdrType == BRANCHPT ||
hdrType == BUILDV... |
<vulnerable_code> }
}
if (tree->cdr->car) { /* keyword arguments */
if (n == 14) {
pop_n(n);
genop_2(s, OP_ARRAY, cursp(), n);
push();<commit_title>[PATCH] codegen.c: need to pack argument when `n==13` too.<commit_description>Because we have e... |
<vulnerable_code> * @}
*/
#include <string.h>
#include <stdio.h>
return _tmp;
}
static size_t _skip_hostname(uint8_t *buf)
{
uint8_t *bufpos = buf;
/* handle DNS Message Compression */
if (*bufpos >= 192) {
return 2;
}
while(*bufpos) {
bufpos += *bufpos + 1;
}
retur... |
<vulnerable_code> // static public boolean GRAPHVIZCACHE = false;
// static public final boolean TRACE_DOT = false;
static public boolean ALLOW_INCLUDE = true;
static public void setAllowIncludeFalse() {
ALLOW_INCLUDE = false;
}
static public void setMaxPixel(int max) {
}<commit_title>[PATCH] feat: remove le... |
<vulnerable_code>import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.file.AFile;
import net.sourceforge.plantuml.file.AFileRegular;
import net.sourceforge.plantuml.file.AFileZipEntry;
}
public ImportedFiles withCurrentDir(AParentFolder newC... |
<vulnerable_code> }
public static SFile fromFile(File internal) {
if (internal == null) {
return null;
}
return new SFile(internal);
}
/**
* Check SecurityProfile to see if this file can be open.
*/
private boolean isFileOk() {
// ::comment when __CORE__
if (SecurityUtils.getSecurityProfile() == ... |
<vulnerable_code> /**
* Check SecurityProfile to see if this URL can be opened.
*/
private boolean isUrlOk() {
// ::comment when __CORE__
if (SecurityUtils.getSecurityProfile() == SecurityProfile.SANDBOX)
// In SANDBOX, we cannot read any URL<commit_title>[PATCH] feat: remove legacy ALLOW_INCLUDE use<commit... |
<vulnerable_code> *
*/
public enum SecurityProfile {
// ::remove folder when __HAXE__
/**
* Running in SANDBOX mode is completely secure. No local file can be read
throw new AssertionError();
}
}<commit_title>[PATCH] feat: remove legacy ALLOW_INCLUDE use<commit_description><fixed_code>
*
*/
public enum... |
<vulnerable_code> return System.getenv(alternateName);
}
/**
* Checks the environment variable and returns true if the variable is used in
* security context. In this case, the value should not be displayed in scripts.
*
* @param name Environment variable to check
* @return true, if this is a secret varia... |
<vulnerable_code>import java.util.Map;
import java.util.Set;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.tim.EaterException;
import net.sourceforge.plantuml.tim.EaterExceptionLocated;
public TValue executeReturnFunction(TContext context,... |
<vulnerable_code>import java.util.Map;
import java.util.Set;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.tim.EaterException;
import net.sourceforge.plantuml.tim.EaterExceptionLocated;
public TValue executeReturnFunction(TContext ... |
<vulnerable_code> byte[] byteData = null;
if (path.startsWith("http://") || path.startsWith("https://")) {
final SURL url = SURL.create(path);
if (url == null)
throw EaterException.located("load JSON: Invalid URL " + path);
byteData = url.getBytes();
// ::comment when __CORE__
} else {
try {
... |
<vulnerable_code>
public static synchronized LicenseInfo retrieveNamedSlow() {
cache = LicenseInfo.NONE;
if (OptionFlags.ALLOW_INCLUDE == false)
return cache;
final String key = prefs.get("license", "");
if (key.length() > 0) {<commit_title>[PATCH] feat: remove legacy ALLOW_INCLUDE use<commit_description><... |
<vulnerable_code> // :: done
// :: comment when __CORE__
GraphvizCrash.checkOldVersionWarning(strings);
if (OptionFlags.ALLOW_INCLUDE) {
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
strings.add("Loaded from " + Version.getJarPath());
if (OptionFlags.getInstance().isWord()) {
... |
<vulnerable_code>
// Warning, "version" should be the same in gradle.properties and Version.java
// Any idea anyone how to magically synchronize those :-) ?
private static final String version = "1.2023.9beta4";
public static String versionString() {
return version;<commit_title>[PATCH] feat: remove legacy ALLOW... |
<vulnerable_code> returnTo = options.returnTo;
debug('req.oidc.login() called with returnTo: %s', returnTo);
} else if (req.method === 'GET' && req.originalUrl) {
returnTo = req.originalUrl;
debug('req.oidc.login() without returnTo, using: %s', returnTo);
}
<commit_title>[PATCH] Merge pul... |
<vulnerable_code> assert.equal(response.statusCode, 401);
sinon.assert.notCalled(checkSpy);
});
});<commit_title>[PATCH] Merge pull request from GHSA-7p99-3798-f85c<commit_description><fixed_code>
assert.equal(response.statusCode, 401);
sinon.assert.notCalled(checkSpy);
});
it('should collapse lea... |
<vulnerable_code> for session, user in list(self._session_users_by_session.items()):
if not isinstance(user, SessionUser):
continue
if user.created + (24 * 60 * 60) < time.monotonic():
self._logger.info(
"Cleaning up user session {} for ... |
<vulnerable_code> loginFromApiKeyRequestHandler,
requireLoginRequestHandler,
)
from octoprint.server.util.flask import PreemptiveCache
from octoprint.settings import settings
VERSION = __version__
else:
sessionid = None
if sessionid:
user = userManager.find_user(userid=id, session=sessi... |
<vulnerable_code> limit,
no_firstrun_access,
passive_login,
)
from octoprint.settings import settings as s
from octoprint.settings import valid_boolean_trues
user = octoprint.server.userManager.login_user(user)
session["usersession.id"] = user.session
g.user =... |
<vulnerable_code>__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import functools
import logging
import os
import threading
import time
from datetime import datetime
from typing import Union
import flask
import webassets.updater
import webassets.utils
from cache... |
<vulnerable_code>import octoprint.vendor.sockjs.tornado.util
from octoprint.access.groups import GroupChangeListener
from octoprint.access.permissions import Permissions
from octoprint.access.users import LoginStatusListener
from octoprint.events import Events
from octoprint.settings import settings
from octoprint.util... |
<vulnerable_code>
self.userSettingsDialog.trigger("beforeSave");
function process() {
var settings = {
interface: {
language: self.interface_language()
self.access_currentPassword()
)
... |
<vulnerable_code>import unittest
from unittest import mock
from ddt import data, ddt, unpack
from octoprint.server.util.flask import (
def setUp(self):
self.orig_environment_wrapper = OctoPrintFlaskRequest.environment_wrapper
def tearDown(self):
OctoPrintFlaskRequest.environment_wrapper = sta... |
<vulnerable_code> curwin->w_cursor.col = VIsual.col;
++badlen;
end_visual_mode();
}
// Find the start of the badly spelled word.
else if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0<commit_title>[PATCH] patch 8.2.4563: "z=" in Visual mode may go beyond the end of<commit_description><fixed_co... |
<vulnerable_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4562,
/**/<commit_title>[PATCH] patch 8.2.4563: "z=" in Visual mode may go beyond the end of<commit_description><fixed_code>
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
... |
<vulnerable_code><commit_title>[PATCH] NXBT-661: apply patch for CVE-2013-4521 flaw<commit_description><fixed_code>
/**
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of indiv... |
<vulnerable_code> data = objectArray;
} else {
try {
ObjectInputStream in = new ObjectInputStream(
new ByteArrayInputStream(objectArray));
data = in.readObject();
} catch (StreamCorruptedException e) {
log.error(Messages<commit_title>[PATCH] NXBT-661: apply patch for CVE-2013-4521 fl... |
<vulnerable_code> return true;
}
public static class UriData implements Serializable {
/**
* <commit_title>[PATCH] NXBT-661: apply patch for CVE-2013-4521 flaw<commit_description><fixed_code>
return true;
}
public static class UriData implements SerializableResource {
/**
* |
<vulnerable_code>package org.richfaces.demo.media;
import java.awt.Color;
import java.io.Serializable;
public class MediaData implements Serializable{
private static final long serialVersionUID = 1L;
Integer Width=110;<commit_title>[PATCH] NXBT-661: apply patch for CVE-2013-4521 flaw<commit_description><fixed_code... |
<vulnerable_code>package org.richfaces.demo.paint2d;
import java.io.Serializable;
public class PaintData implements Serializable{
/**
*
*/<commit_title>[PATCH] NXBT-661: apply patch for CVE-2013-4521 flaw<commit_description><fixed_code>
package org.richfaces.demo.paint2d;
import org.ajax4jsf.resource.Serializa... |
<vulnerable_code>import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.Serializable;
import javax.faces.FacesException;
import javax.faces.component.UIComponentBase;
import org.ajax4jsf.resource.PngRenderer;
import org.ajax4jsf.resource.ResourceContext;
import org.... |
<vulnerable_code>
// If we are here there was no error servlet, so show the default error page
String output = Launcher.RESOURCES.getString("WinstoneResponse.ErrorPage",
new String[] { sc + "", (msg == null ? "" : msg), sw.toString(),
Launcher.RESOURCES.getString... |
<vulnerable_code> return buf.toString();
}
}<commit_title>[PATCH] escape error messages which are supposed be plain text and<commit_description><fixed_code>
return buf.toString();
}
/**
* Performs necessary escaping to render arbitrary plain text as plain text without any markup.
... |
<vulnerable_code> this.statusCode = sc;
}
String output = Launcher.RESOURCES.getString("WinstoneResponse.ErrorPage",
new String[] { sc + "", (msg == null ? "" : msg), "",
Launcher.RESOURCES.getString("ServerVersion"),
"" + new Da... |
<vulnerable_code>#include <linux/cn_proc.h>
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/compat.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h> /* for audit_free() */
#include <linux/resource.h>
exit_itimers(tsk->signal);
}
acct_collect(code, group_dead);
#ifdef CONFIG_FUTEX
if (unlik... |
<vulnerable_code>#include <linux/jiffies.h>
#include <linux/tracehook.h>
#include <linux/futex.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/rcupdate.h>
#include <linux/ptrace.h>
{
struct completion *vfork_done = tsk->vfork_done;
/* Get rid of any cached register state */
deactivate_mm(tsk, mm);
<com... |
<vulnerable_code> else:
if userobj:
cherrypy.session[SESSION_KEY] = userobj.username
raise cherrypy.HTTPRedirect(form.redirect.data)
flash(_("Invalid username or password."))
@cherrypy.config(**{'tools.auth_form.on': False})
def... |
<vulnerable_code>
import galaxy.model
from galaxy.util import listify
from galaxy.util import stringify_dictionary_keys
from galaxy.util import string_as_bool
from galaxy.util import in_directory
def to_string( self, value ):
return str( value )
def make_copy( self, value, target_context = None, source... |
<vulnerable_code>import tempfile
from galaxy import model
from galaxy.util.bunch import Bunch
from galaxy.util.none_like import NoneDataset
from galaxy.util.template import fill_template
from galaxy.tools.wrappers import (
DatasetFilenameWrapper,
DatasetListWrapper,
DatasetCollectionWrapper,
self._... |
<vulnerable_code>from galaxy import exceptions
from galaxy.util.none_like import NoneDataset
from galaxy.util import odict
from logging import getLogger
log = getLogger( __name__ )
if name in self.metadata.spec:
if rval is None:
rval = self.metadata.spec[name].no_value
... |
<vulnerable_code> '#': '__pd__'}
def restore_text(text):
"""Restores sanitized text"""
if not text:
return text
for key, value in mapped_chars.items():
text = text.replace(value, key)
return text
def sanitize_text(text):
"""
Restricts the characters that are a... |
<vulnerable_code>#dbkeys read from disk using builds.txt
from galaxy.util import read_dbnames
from galaxy.util.json import loads
import os.path
# use configured server len path
if not chrom_info:
# Default to built-in build.
chrom_info = os.path.join( self._static_chrom_info_pa... |
<vulnerable_code><commit_title>[PATCH] Fix a critical security vulnerability where unsanitized<commit_description><fixed_code>
"""
Classes for wrapping Objects and Sanitizing string output.
"""
import inspect
import copy_reg
import logging
import string
from numbers import Number
from types import ( NoneType, NotImple... |
<vulnerable_code>{
#define WriteRunlengthPacket(image,pixel,length,p) \
{ \
if ((image->alpha_trait != UndefinedPixelTrait) && \
(GetPixelAlpha(image,p) == (Quantum) TransparentAlpha)) \
{ \
q=PopHexPixel(hex_digits,0xff,q); \
/*
Dump DirectClass image.
*/
(vo... |
<vulnerable_code> 'base_executable': executable,
'executable': executable,
'module_search_paths': module_search_paths,
'python3_dll': self.EXPECTED_CONFIG['config']['python3_dll'] + "FOO",
}
env = self.copy_paths_by_env(config)
... |
<vulnerable_code>
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import com.typesafe.config.Config;
import org.jooby.funzy.Try;
log.error("execution of: {}{} resulted in exception\nRoute:\n{}\n\nStacktrace:",
req.method(), req.path(), req.route().print(6), ex);
C... |
<vulnerable_code> // default /favicon.ico handler:
rsp.status(Status.NOT_FOUND).end();
} else {
throw new Err(Status.NOT_FOUND, req.path(true));
}
}
}, method, path, "err", accept));<commit_title>[PATCH] Avoiding possible XSS attack through the default error<commit... |
<vulnerable_code> public static RouteWithFilter notFound(final String method, final String path) {
return new FallbackRoute("404", method, path, MediaType.ALL, (req, rsp, chain) -> {
if (!rsp.status().isPresent()) {
throw new Err(Status.NOT_FOUND, req.path(true));
}
});
}<commit_title>[PA... |
<vulnerable_code>package org.jooby;
import com.google.common.collect.ImmutableList;
import com.typesafe.config.Config;
import static org.easymock.EasyMock.expect;
import org.jooby.test.MockUnit;
expect(conf.getBoolean("err.stacktrace")).andReturn(stacktrace);
Env env = unit.get(Env.class);
expect(env... |
<vulnerable_code> runReduceStepTest(new Locale("es", "PA"), "16:00", "p. m.");
}
private void runReduceStepTest(Locale locale, String initialValue4PM,
String pmString) {
ArrayList<String> errors = new ArrayList<>(0);<commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4... |
<vulnerable_code> }
}
window.Vaadin.Flow.timepickerConnector = {
initLazy: (timepicker) =>
tryCatchWrapper(function (timepicker) {
return cachedTimeObject;
}
if (timeString) {
const pm = timeString.search(pmString);
const am =... |
<vulnerable_code><commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4.5.1 (#3047)<commit_description>Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.5.0.... |
<vulnerable_code><commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4.5.1 (#3047)<commit_description>Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.5.0.... |
<vulnerable_code> getElement().setProperty("opened", opened);
}
private void setModality(boolean modal) {
if (isAttached()) {
getUI().ifPresent(ui -> ui.setChildComponentModal(this, modal));<commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4.5.1 (#3047)<commit_descri... |
<vulnerable_code> }
}
window.Vaadin.Flow.contextMenuConnector = {
/**
* Initializes the connector for a context menu element.
*
* @param {HTMLElement} contextMenu
* @param {string} appId
*/
initLazy: tryCatchWrapper((contextMenu, appId) => {
if (contextMenu.$connector) {
... |
<vulnerable_code> return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu Target');
}
window.Vaadin.Flow.contextMenuTargetConnector = {
init: tryCatchWrapper(function (target) {
if (target.$contextMenuTargetConnector) {
return;
}
target.$contextMenuTargetConnector... |
<vulnerable_code> return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Menu Bar');
};
window.Vaadin.Flow.menubarConnector = {
/**
* Initializes the connector for a menu bar element.
*
* @param {HTMLElement} menubar
* @param {string} appId
*/
initLazy: tryCatchWrapper(func... |
<vulnerable_code> if (getTarget() != null) {
targetBeforeOpenRegistration.remove();
targetAttachRegistration.remove();
getTarget().getElement()
.callJsFunction("$contextMenuTargetConnector.removeConnector");
if (isTargetJsPending()) {
... |
<vulnerable_code> getItems().forEach(this::resetContainers);
int containerNodeId = createNewContainer(menu.getChildren());
getElement().callJsFunction("$connector.generateItems", containerNodeId);
updateScheduled = false;
});<commit_title>[PATCH 01/16] chore: bum... |
<vulnerable_code> */
public void add(Component... components) {
Objects.requireNonNull(components, "Components should not be null");
for (Component component: components) {
Objects.requireNonNull(component, "Component to add cannot be null");
root.... |
<vulnerable_code> MenuBar menuBar = new MenuBar();
MenuItem menuItem = menuBar.addItem("Item");
NativeButton toggleMenuBarVisibility = new NativeButton("Toggle menu bar visibility", (event) -> {
menuBar.setVisible(!menuBar.isVisible());
});
toggleMenuBarVisibility.set... |
<vulnerable_code>
@TestPath("vaadin-menu-bar/menu-bar-visibility")
public class MenuBarVisibilityIT extends AbstractComponentIT {
private MenuBarElement menuBar;
private TestBenchElement toggleMenuBarVisibility;
private TestBenchElement toggleMenuItemVisibility;
private TestBenchElement toggleMenuItemEnabled;
... |
<vulnerable_code>
private void initConnector(String appId) {
getElement().executeJs(
"window.Vaadin.Flow.menubarConnector.initLazy(this, $0)", appId);
}
private void runBeforeClientResponse(SerializableConsumer<UI> command) {<commit_title>[PATCH 01/16] chore: bump mockito-core from ... |
<vulnerable_code> *
* @author Vaadin Ltd
*/
@JsModule("./timepickerConnector.js")
public class TimePicker extends GeneratedVaadinTimePicker<TimePicker, LocalTime>
implements HasSize, HasValidation, HasEnabled, HasHelper, HasLabel,
HasTheme {<commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5... |
<vulnerable_code>(function () {
const tryCatchWrapper = function (callback) {
return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Time Picker');
};
// Execute callback when predicate returns true.
// Try again later if predicate returns false.
function when(predicate, callback, timeout = 0) {
... |
<vulnerable_code><commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4.5.1 (#3047)<commit_description>Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.5.0.... |
<vulnerable_code><commit_title>[PATCH 01/16] chore: bump mockito-core from 4.5.0 to 4.5.1 (#3047)<commit_description>Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.5.0.... |
<vulnerable_code> * License for the specific language governing permissions and limitations under
* the License.
*/
package com.vaadin.flow.component.timepicker;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class TimeP... |
<vulnerable_code>
package com.vaadin.flow.component.charts.export;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.vaadin.flow.server.frontend.FrontendTools;
import com.vaadin.flow.server.frontend.FrontendToolsSettings;
import com.vaadin.flow.server.frontend.FrontendUtils;
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.