text
stringlengths
79
3.72M
<vulnerable_code> view.datamodel = CustomSQLAInterface(view.datamodel.obj) self.perms = None def create_db(self) -> None: if not self.appbuilder.update_perms: self.log.debug("Skipping db since appbuilder disables update_perms") return super().create_db() ...
<vulnerable_code>from __future__ import annotations from unittest import mock from unittest.mock import Mock import pytest from airflow.auth.managers.fab.security_manager.override import FabAirflowSecurityManagerOverride appbuilder = Mock() resetmypasswordview = Mock() resetpasswordview = Mock() rolemodelview = Moc...
<vulnerable_code>TASK_ID = "batch_job_sensor" JOB_ID = "8222a1c2-b246-4e19-b1b8-0039bb4407c0" AWS_REGION = "eu-west-1" class TestBatchSensor: def setup_method(self): self.batch_sensor = BatchSensor( task_id="batch_job_sensor", job_id=JOB_ID, ) @mock.patch.object(BatchC...
<vulnerable_code> class FabAirflowSecurityManagerOverrideDb: """ This class contains all methods in airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride related to the database. FabAirflowSecurityManagerOverride is split into multiple classes to avoid having one mas...
<vulnerable_code> class FabAirflowSecurityManagerOverrideOauth: """ This class contains all methods in airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride related to the oauth authentication. FabAirflowSecurityManagerOverride is split into multiple classes to avoid...
<vulnerable_code> :param retry_limit: Maximum number of times to retry this job if it fails :param num_of_dpus: Number of AWS Glue DPUs to allocate to this Job :param region_name: aws region name (example: us-east-1) :param iam_role_name: AWS IAM Role for Glue Job Execution :param create_job_kwargs: ...
<vulnerable_code> :param num_of_dpus: Number of AWS Glue DPUs to allocate to this Job. :param region_name: aws region name (example: us-east-1) :param s3_bucket: S3 bucket where logs and local etl script will be uploaded :param iam_role_name: AWS IAM Role for Glue Job Execution :param create_job_kwar...
<vulnerable_code> assert "Arn" in iam_role["Role"] assert iam_role["Role"]["Arn"] == f"arn:aws:iam::123456789012:role{role_path}{expected_role}" @mock.patch.object(AwsBaseHook, "conn") def test_has_job_exists(self, mock_conn): job_name = "aws_test_glue_job" assert result is False...
<vulnerable_code> script_args="{{ dag.dag_id }}", create_job_kwargs="{{ dag.dag_id }}", iam_role_name="{{ dag.dag_id }}", s3_bucket="{{ dag.dag_id }}", job_name="{{ dag.dag_id }}", ) assert DAG_ID == rendered_template.script_args assert ...
<vulnerable_code> return ret_value; } /* ecma_op_function_call_bound */ /** * General [[Call]] implementation *<commit_title>[PATCH] Accessors should be kept alive during their invocation<commit_description>This patch fixes #4900. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu<fixed_code...
<vulnerable_code> return ecma_fast_copy_value (prop_value_p->value); } ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (prop_value_p); if (get_set_pair_p->getter_cp == JMEM_CP_NULL) { return ECMA_VALUE_UNDEFINED; } ecma_object_t *getter_p = ECMA_GET_NON_NULL_POINTE...
<vulnerable_code> return ecma_fast_copy_value (prop_value_p->value); } ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (prop_value_p); if (get_set_pair_p->getter_cp == JMEM_CP_NULL) { return ECMA_VALUE_UNDEFINE...
<vulnerable_code> return ecma_raise_type_error (ECMA_ERR_PRIVATE_FIELD_WAS_DEFINED_WITHOUT_A_SETTER); } ecma_object_t *setter_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, get_set_pair_p->setter_cp); return ecma_op_function_call (setter_p, base, &value, 1); } /* opfunc_private_set */ /** } else ...
<vulnerable_code> // _tmpBuffer = new unsigned short [checkArraySize (uiMult (maxScanLineSize, numScanLines), sizeof (unsigned short))]; const ChannelList &channels = header().channels();<commit_title>[PATCH] reduce B44 _tmpBufferSize (was allocating two bytes per byte)<com...
<vulnerable_code>import org.infinispan.commons.marshall.Marshaller; import org.infinispan.configuration.cache.CacheMode; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.rest.NettyRestServer; import org.infinispan.rest.configuration.RestServerConfigurationBuilder; import org.infinispan.server.h...
<vulnerable_code> private String trustStoreFileName; private char[] trustStorePassword; private char[] keyStoreCertificatePassword; private String domain = "*"; SslEngineConfigurationBuilder(SslConfigurationBuilder parentSslConfigurationBuilder) { this.parentSslConfigurationBuilder = parentSslConfi...
<vulnerable_code>import io.netty.channel.ChannelPipeline; import io.netty.handler.ssl.JdkSslContext; import io.netty.handler.ssl.SniHandler; import io.netty.util.DomainMappingBuilder; /** * Pipeline factory for Netty based channels. For each pipeline created, a new decoder is created which means that SslConfig...
<vulnerable_code> } public static JdkSslContext createSslContext(SSLContext sslContext, ClientAuth clientAuth) { //Unfortunately we need to grap a list of available ciphers from the engine. //If we won't, JdkSslContext will use common ciphers from DEFAULT and SUPPORTED, which gives us 5 out of ~50 ava...
<vulnerable_code> @LogMessage(level = INFO) @Message(id = 10034, value = "Multi tenant router started (HotRod listening on %s, REST listening on %s") void routerStarted(String hotrodAddress, String restAddress); }<commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC auth...
<vulnerable_code> break; } case AUTH_METHOD: { RestConnectorResource.AUTH_METHOD.parseAndSetParameter(value, connector, reader); break; } case CACHE_CONTAINER: { break; } case SECURITY_DOMAIN: { RestConnecto...
<vulnerable_code> for (SimpleAttributeDefinition attribute : RestConnectorResource.REST_ATTRIBUTES) { attribute.marshallAsAttribute(connector, true, writer); } writeEncryption(writer, connector); writer.writeEndElement(); } } } private void writeProperties(XMLExtendedStre...
<vulnerable_code> import org.infinispan.configuration.global.GlobalConfiguration; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.rest.NettyRestServer; import org.infinispan.server.hotrod.HotRodServer; import org.infinispan.server.infinispan.spi.service.CacheContainerServiceName; import org.in...
<vulnerable_code>import java.util.HashMap; import java.util.Optional; import org.infinispan.rest.NettyRestServer; import org.infinispan.rest.Server; import org.infinispan.server.hotrod.HotRodServer; import org.infinispan.server.router.MultiTenantRouter;<commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit...
<vulnerable_code> */ package org.infinispan.server.endpoint.subsystem; public enum AuthMethod { BASIC, DIGEST, CLIENT_CERT, SPNEGO; @Override public String toString() { return super.toString().replace('_', '-'); } }<commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- sup...
<vulnerable_code><commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC authentication - works with the server's SecurityRealms instead of SecurityDomin - drops support for some attributes (virtual-server, security-mode)<fixed_code> /* * JBoss, Home of Professional Open Source ...
<vulnerable_code> .setRestartAllServices() .build(); static final SimpleAttributeDefinition AUTH_METHOD = new SimpleAttributeDefinitionBuilder(ModelKeys.AUTH_METHOD, ModelType.STRING, true) .setAllowExpression(true) .setXmlName(ModelKeys.AUTH_METHOD) ...
<vulnerable_code>import java.util.stream.Collectors; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.rest.NettyRestServer; import org.infinispan.rest.configuration.ExtendedHeaders; import org.infinispan.rest.configuration.RestServerConfigurationBuilder; import org.jboss.as.controller.services...
<vulnerable_code> // Read the full model ModelNode config = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS)); // Create the service final RestService service = new RestService(getServiceName(config), config); // Setup the various dependencies with injectors and in...
<vulnerable_code>/* * JBoss, Home of Professional Open Source * Copyright 2012-2013 Red Hat Inc. and/or its affiliates and other contributors * as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a * full listing of individual contributors. * * This copyrighted ...
<vulnerable_code><commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC authentication - works with the server's SecurityRealms instead of SecurityDomin - drops support for some attributes (virtual-server, security-mode)<fixed_code> package org.infinispan.server.endpoint.subsyste...
<vulnerable_code><commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC authentication - works with the server's SecurityRealms instead of SecurityDomin - drops support for some attributes (virtual-server, security-mode)<fixed_code> package org.infinispan.server.endpoint.subsyste...
<vulnerable_code> Object[][] data = new Object[][] { { "endpoint-7.2.xml", 16, "schema/jboss-infinispan-endpoint_7_2.xsd" }, { "endpoint-8.0.xml", 16, "schema/jboss-infinispan-endpoint_8_0.xsd" }, { "endpoint-9.0.xml", 37, "schema/jboss-infinispan-endpoint_9_0.xsd" }, }; ...
<vulnerable_code>package org.infinispan.server.test.client.rest; import static org.infinispan.server.test.client.rest.RESTHelper.*; import static org.jboss.aesh.terminal.Key.e; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io....
<vulnerable_code>import org.apache.http.client.methods.HttpHead; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.InputStreamEntity; import org.apache.http.entity.StringEntity; pu...
<vulnerable_code> private static final String TEST_USER_PASSWORD = "testpassword"; private static final String KEY_D = "d"; protected void securedWriteOperations() throws Exception { RESTHelper.setCredentials(TEST_USER_NAME, TEST_USER_PASSWORD); put(fullPathKey(KEY_A), "data", "application/t...
<vulnerable_code>import org.jboss.arquillian.junit.Arquillian; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; * @author <a href="mailto:vchepeli@redhat.com">Vitalii Chepeliuk</a> */ @RunWith(Arquillian.class) @Ignore public class REST...
<vulnerable_code>import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.security.cert.X509Certificate; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLException; import javax.net.ssl.SSLSession; import java...
<vulnerable_code> } @Test @WithRunningServer({@RunningServer(name = CONTAINER, config = "testsuite/rest-sec-digest-wr.xml")}) public void testSecuredWriteOperations() throws Exception { securedWriteOperations(); } @Test @WithRunningServer({@RunningServer(name = CONTAINER, config = "...
<vulnerable_code>package org.infinispan.rest; import java.io.IOException; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.ContainerResponseFilter; import org.infinispan.commons.api.Lifecycle; import org.infinispan.commons.logging.LogFactory; import org.infinispan.manager.DefaultCach...
<vulnerable_code>import org.infinispan.remoting.transport.jgroups.JGroupsTransport; import org.infinispan.upgrade.RollingUpgradeManager; class RestCacheManager { private final EmbeddedCacheManager instance; private final Predicate<? super String> isCacheIgnored; private final boolean allowInternalCacheAccess;...
<vulnerable_code>package org.infinispan.rest; import java.security.AccessController; import java.security.PrivilegedAction; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.security.Security; import org.infinispan.security.actions.GetCacheAction; /** * SecurityActions for the org.infinispan...
<vulnerable_code>import java.util.function.Consumer; import java.util.function.Supplier; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.DELETE; import javax.ws.rs.DefaultValue; */ @Path("/") public class Server { private final RestServerConfiguration configuration; private final RestCacheMana...
<vulnerable_code>import io.netty.handler.codec.http.HttpObjectAggregator; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.codec.http.HttpResponseEncoder; import io.netty.handler.ssl.SniHandler; import io.netty.handler.ssl.SslHandler; import io.netty.handler.timeout.IdleStateHandler; pr...
<vulnerable_code> private static void addEncryption(RestServerConfiguration config, NettyJaxrsServer netty) { if (config.ssl() != null && config.ssl().enabled()) { SslConfiguration sslConfig = config.ssl(); SniConfiguration nettySniConfiguration = new SniConfiguration(SslUtils.createJdkSslCont...
<vulnerable_code>import org.jboss.resteasy.util.HttpHeaderNames; import org.jboss.resteasy.util.MediaTypeHelper; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; /** */ public class NettyUtil { public static ResteasyUriInfo extractUriInfo(HttpRequest request, String ...
<vulnerable_code>public class SniConfiguration { protected final DomainNameMappingBuilder<SslContext> mapping; /** * Constructs new {@link SniConfiguration}. * @param defaultServerKeystore default keystore to be used when no SNI is specified by the client. */ public SniConfiguration(SSLContext de...
<vulnerable_code><commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC authentication - works with the server's SecurityRealms instead of SecurityDomin - drops support for some attributes (virtual-server, security-mode)<fixed_code> package org.infinispan.rest.embedded.netty4.sec...
<vulnerable_code> import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.rest.configuration.RestServerConfiguration; public class EmbeddedRestServer { <commit_title>[PATCH] ISPN-7485 Restore REST authentication<commit_description>- support BASIC authentication - works with the server's SecurityRealm...
<vulnerable_code>import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.rest.configuration.RestServerConfiguration; import org.infinispan.rest.configuration.RestServerConfigurationBuilder; import org.infinispan.test.AbstractInfinispanTest; /**<commit_title>[PATCH] ISPN-7485 Restore REST authenticati...
<vulnerable_code> import org.infinispan.commons.logging.LogFactory; import org.infinispan.rest.Server; import org.infinispan.rest.logging.RestAccessLoggingHandler; import org.infinispan.server.router.RoutingTable; import org.infinispan.server.router.configuration.RestRouterConfiguration; import org.infinispan.server.ro...
<vulnerable_code> import java.net.InetAddress; import org.infinispan.rest.NettyRestServer; import org.infinispan.server.router.MultiTenantRouter; import org.infinispan.server.router.configuration.builder.MultiTenantRouterConfigurationBuilder; import org.infinispan.server.router.routes.Route;<commit_title>[PATCH] ISPN-...
<vulnerable_code>import org.infinispan.configuration.cache.ConfigurationBuilder; import org.infinispan.configuration.global.GlobalConfigurationBuilder; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.rest.NettyRestServer; import org.infinispan.rest.configuration.RestServerConfigurationBuilder; ...
<vulnerable_code> import spark.utils.Assert; import spark.utils.ClassUtils; import spark.utils.StringUtils; /** */ public ClassPathResource(String path, ClassLoader classLoader) { Assert.notNull(path, "Path must not be null"); Assert.state(doesNotContainFileColon(path), "Path must not contain ...
<vulnerable_code>import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.junit.After; import org.junit.Test; import spark.embeddedserver.EmbeddedServer; import spark.route.Routes; import spark.staticfiles.StaticFilesConfiguration; import static org.mockito.Mockito.*; public class EmbeddedJettyFactoryTest { ...
<vulnerable_code>package spark.examples.staticresources; import static spark.Spark.get; import static spark.Spark.staticFileLocation; /** * Example showing how serve static resources. public static void main(String[] args) { // Will serve all static file are under "/public" in classpath if the route isn...
<vulnerable_code> def execActionStop(self): stopCmd = Action.replaceTag(self.__actionStop, self.__cInfo) return Action.executeCmd(stopCmd) ## # Replaces tags in query with property values in aInfo. # """ Replace tags in query """ string = query for tag in aInfo: string = string.replace('<' + tag + '...
<vulnerable_code>} ); test( "closeText", function() { expect( 3 ); var element = $( "<div></div>" ).dialog(); equal( $.trim( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text() ), "Close", equal( $.trim( element.dialog( "widget" ).find( ".ui-dialog-titlebar-close" ).text() ), "bar", "closeT...
<vulnerable_code> // dialog in IE (#9312) this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) .button( { label: this.options.closeText, icon: "ui-icon-closethick", showLabel: false } ) this.uiDialogTitlebarClose.button( { // Ensure that we always pass a string label: "" ...
<vulnerable_code> } } mb.model.actions.initMoreButton(mb.renderer.calcAmountOfButtons()); mb.renderer.render(mb.model.getState()); }, init_mobile = function() { var mb = il.UI.maincontrols.mainbar; public_interface = { read: readStates, store: stor...
<vulnerable_code> } } mb.model.actions.initMoreButton(mb.renderer.calcAmountOfButtons()); mb.renderer.render(mb.model.getState()); }, init_mobile = function() { var mb = il.UI.maincontrols.mainbar;<commit_title>[PATCH 01/30] Revert CSS fixed 31419<commit_description><f...
<vulnerable_code> public_interface = { read: readStates, store: storeStates }; return public_interface;<commit_title>[PATCH 01/30] Revert CSS fixed 31419<commit_description><fixed_code> public_interface = { read: readStates, store: storeStates, storePageState : ...
<vulnerable_code> request.method = req.method.toLowerCase() request.response = res if (request.method !== 'get') { return self.emit('error', 405, request, res) }<commit_title>[PATCH] fix security vulnerability<commit_description><fixed_code> request.method = req.method.toLowerCase() request.response = r...
<vulnerable_code> }) }) test('serves index page', function (t) { t.plan(2) <commit_title>[PATCH] fix security vulnerability<commit_description><fixed_code> }) }) test('403s if path traversal is attempted', function (t) { t.plan(1) http.get('http://localhost:1666/../index.js', function (res) { t.strictEq...
<vulnerable_code>class AsyncKubernetesHook(KubernetesHook): """Hook to use Kubernetes SDK asynchronously.""" def __init__(self, config_dict: dict | None = None, *args, **kwargs): super().__init__(*args, **kwargs) self.config_dict = config_dict self._extras: dict | None = None asyn...
<vulnerable_code> import json import logging import os import re import secrets import string from airflow.kubernetes import pod_generator from airflow.kubernetes.pod_generator import PodGenerator from airflow.kubernetes.secret import Secret from airflow.models import BaseOperator, Connection from airflow.providers.cnc...
<vulnerable_code> :param kubernetes_conn_id: The :ref:`kubernetes connection id <howto/connection:kubernetes>` for the Kubernetes cluster. :param cluster_context: Context that points to kubernetes cluster. :param config_dict: Kubernetes config file content in dict format. If not specified, de...
<vulnerable_code># under the License. from __future__ import annotations import json import os import re from contextlib import nullcontext from unittest import mock from unittest.mock import MagicMock, mock_open, patch import pendulum import pytest from airflow.exceptions import AirflowException, TaskDeferred from ...
<vulnerable_code> type: integer description: User id required: true - in: query name: delete_dependents schema: type: boolean<commit_title>[PATCH] Corrected formatting error in OAS docstring<commit_description><fixed_code> ...
<vulnerable_code>from django.utils.translation import ugettext as _, ungettext from django.views import generic from django.views.decorators.csrf import ensure_csrf_cookie from modoboa.core.models import User from modoboa.lib.exceptions import BadRequest, PermDeniedException @login_required @permission_required("core...
<vulnerable_code> max_packets=((image->columns+7UL) >> 3UL)*image->rows; else max_packets=(size_t) (number_pixels*viff_info.number_data_bands); pixels=(unsigned char *) AcquireQuantumMemory(max_packets, bytes_per_pixel*sizeof(*pixels)); if (pixels == (unsigned char *) NULL) ThrowReade...
<vulnerable_code> else delegate_info=GetDelegateInfo("pcl:color",(char *) NULL,exception); if (delegate_info == (const DelegateInfo *) NULL) return((Image *) NULL); if ((page.width == 0) || (page.height == 0)) (void) ParseAbsoluteGeometry(PSPageGeometry,&page); if (image_info->page != (char *) ...
<vulnerable_code> }); $scope.setXdebugCookie = function(){ $.cookie('XDEBUG_TRIGGER', 'true'); $scope.hasXdebugCookie = true; }; $scope.removeXdebugCookie = function(){ $.removeCookie('XDEBUG_TRIGGER'); $scope.hasXdebugCookie = false; ...
<vulnerable_code> X509_CTX *x509_ctx); static int x509_v3_key_usage(const uint8_t *cert, int offset, X509_CTX *x509_ctx); /** * Retrieve the signature from a certificate. */ static const uint8_t *get_signature(const uint8_t *asn1_sig, int *len) { int offset = 0; const uint8_t *ptr = NULL; ...
<vulnerable_code> @staticmethod def create_dependency_tree(source_dir, url=None, options=None, update=False): source_dir_rp = os.path.realpath(source_dir) root = Subproject.create("root", url, source_dir, {}, {}, toplevel = True) if url and update: root.checkout() ...
<vulnerable_code> * Lossless JPEG Modifications: * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2009-2011, 2016, 2019, 2022, D. R. Commander. * Copyright (C) 2013, Linaro Limited. * Copyright (C) 2015, Google, Inc. * For conditions of distribution and use, see the accompanying...
<vulnerable_code> * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1996, Thomas G. Lane. * libjpeg-turbo Modifications: * Copyright (C) 2009, 2014-2015, 2020, 2022, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * cquantize->...
<vulnerable_code> "../ajax" ], function( jQuery, document ) { // Install script dataType jQuery.ajaxSetup( { accepts: {<commit_title>[PATCH] Ajax: Mitigate possible XSS vulnerability<commit_description>Proposed by @jaubourg Cherry-picked from b078a62013782c7424a4a61a240c23c4c0b42614 Fixes gh-2432 Closes gh-2588<fixe...
<vulnerable_code> def parse(validator_string, validators=None): validators = validators or val.DefaultValidators try: tree = ast.parse(validator_string, mode='eval') # evaluate with access to a limited global scope only<commit_title>[PATCH] Limit the strings which can be eval'd<commit_descriptio...
<vulnerable_code> const Restricted = (Component) => { const checkAuth = (props) => { return props.isLoggedIn ? <Component {...props} /> : <Auth/> } <commit_title>[PATCH] force login if token doesn't exist<commit_description><fixed_code> const Restricted = (Component) => { const checkAuth = (props) => { co...
<vulnerable_code> const sessionData = await session.getSession(); let isLoggedIn = false; if (sessionData.user && sessionData.user.username) { isLoggedIn = true; } <commit_title>[PATCH] force login if token doesn't exist<commit_description><fixed_code> const sessionData = await session.getSes...
<vulnerable_code> // [databind#2620]: xbean-reflect s.add("org.apache.xbean.propertyeditor.JndiConverter"); DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s); } <commit_title>[PATCH] Fixing issues #2631 and #2634<commit_description><fixed_code> // [databind#2620...
<vulnerable_code> const dest = new URL(source, reqBase) // if base is specified, source url should not override it if (reqBase && !reqBase.startsWith(dest.origin)) { throw new Error('source must be a relative path string') } return dest<commit_title>[PATCH] Merge pull request from GHSA-qmw8-3v4g-gwj4<com...
<vulnerable_code> t.equal(url.href, 'http://localhost/hi') }) const errorInputs = [ { source: '//10.0.0.10/hi', base: 'http://localhost' }, { source: 'http://10.0.0.10/hi', base: 'http://localhost' }, { source: 'https://10.0.0.10/hi', base: 'http://localhost' }, { source: 'blah://10.0.0.10/hi', base: 'http://...
<vulnerable_code> process.exit(0) } const instance = Fastify() instance.register(From) t.plan(10) t.tearDown(instance.close.bind(instance)) const socketPath = `${__filename}.socket` try { fs.unlinkSync(socketPath) } catch (_) { }) instance.get('/', (request, reply) => { reply.from(`unix+http://${querystring.e...
<vulnerable_code> private static RMQMessage instantiateRmqMessage(String messageClass, List<String> trustedPackages) throws RMQJMSException { if(isRmqObjectMessageClass(messageClass)) { return instantiateRmqObjectMessageWithTrustedPackages(trustedPackages); } else { try { ...
<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; im...
<vulnerable_code> public class ObjectMessageSerializationIT extends AbstractITQueue { private static final String QUEUE_NAME = "test.queue." + SimpleQueueMessageDefaultsIT.class.getCanonicalName(); private static final long TEST_RECEIVE_TIMEOUT = 1000; // one second private static final java.util.List<Stri...
<vulnerable_code><commit_title>[PATCH] Use trusted packages in StreamMessage<commit_description>StreamMessage now uses the same "white list" mechanism as ObjectMessage to avoid some arbitrary code execution on deserialization. Even though StreamMessage is supposed to handle only primitive types, it is still to possibl...
<vulnerable_code> t = calloc(1,sizeof(*Stack)); t->type = Stack->type; t->val = Stack->val; t->next = Stack; Stack = t; }<commit_title>[PATCH] Perform deep copy in pushdup (instead of shallow)<commit_description>Until now, the element duplication in pushdup was performed via t->val = Stack->val. While this is per...
<vulnerable_code>from tensorflow.python.framework import test_util from tensorflow.python.ops import array_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import lookup_ops from tensorflow.python.ops import map_fn from tensorflow.python.ops import variables self.evaluate(lookup_ops...
<vulnerable_code> if (!text || !text->size) return 0; BUFPUTSL(ob, "<q>"); bufput(ob, text->data, text->size); BUFPUTSL(ob, "</q>"); return 1;<commit_title>[PATCH] Fix a security issue using `:quote` with `:escape_html`<commit_description>Reported by @johan-smits.<fixed_code> if (!text || !text->size) return...
<vulnerable_code> SUPPORTED_METHODS = ('GET',) @web.authenticated def get(self, format, path): class NbconvertPostHandler(IPythonHandler): SUPPORTED_METHODS = ('POST',) @web.authenticated def post(self, format): exporter = get_exporter(format, config=self.config)<commit_title>[PATCH] ...
<vulnerable_code> forEach(path, function(key, idx) { if (key === '__proto__') { throw new Error('illegal key: __proto__'); }<commit_title>[PATCH] fix(object#set): enforce key types<commit_description><fixed_code> forEach(path, function(key, idx) { if (typeof key !== 'number' && typeof key !== '...
<vulnerable_code> }).to.throw(/illegal key/); }); }); <commit_title>[PATCH] fix(object#set): enforce key types<commit_description><fixed_code> }).to.throw(/illegal key/); }); it('should not allow prototype polution via constructor', function() { expect(function() { set({}, ['c...
<vulnerable_code> @Extension public static class ElasticSearchPluginExecutor implements PluginExecutor<RestClient> { private final Scheduler scheduler = Schedulers.elastic(); public static final String esDatasourceNotFoundMessage = "The Page you are tyring to access does not exist"; pu...
<vulnerable_code> assertEquals("Invalid host provided.", e.getMessage()); }); } }<commit_title>[PATCH] Fixing test cases and also adding tests for<commit_description><fixed_code> assertEquals("Invalid host provided.", e.getMessage()); }); } ...
<vulnerable_code> @package freshcat */ function getMethods(a){var b=[],c;for(c in a)try{"function"==typeof a[c]&&b.push(c+": "+a[c].toString())}catch(e){b.push(c+": inaccessible")}return b}function dump(a,b){var c="";b||(b=0);for(var e="",d=0;d<b+1;d++)e+=" ";if("object"==typeof a)for(var f in a)d=a[f],"obje...
<vulnerable_code> char** list = CommandLineParseCommaSeparatedValuesEx(NULL, server->ipcSocket, &count); if (!list || (count <= 1)) { free(list); if (server->ipcSocket == NULL) { if (!open_port(server, NULL)) return -1; } else return -1; } for (x = 1; x < count; x++)<commit_title>[...
<vulnerable_code> s.add("org.aoju.bus.proxy.provider.RmiProvider"); s.add("org.aoju.bus.proxy.provider.remoting.RmiProvider"); DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s); } <commit_title>[PATCH] Block one more gadget type (activemq-pool[-jms],<commit_description><fixed_cod...
<vulnerable_code> default: vectorlen = 0; serverPanic("Bad SORT type"); /* Avoid GCC warning */ } /* Perform LIMIT start,count sanity checking. */ start = (limit_start < 0) ? 0 : limit_start; end = (limit_count < 0) ? vectorlen-1 : start+limit_count-1; if (start >= vectorlen) { start = v...