text
stringlengths
79
3.72M
<vulnerable_code> import grpc from google import auth as google_auth from google.auth import jwt as google_auth_jwt from google.auth.transport import ( grpc as google_auth_transport_grpc, requests as google_auth_transport_requests,<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<c...
<vulnerable_code> if is_redshift: authority = self._get_openlineage_redshift_authority_part(connection) else: authority = DbApiHook.get_openlineage_authority_part(connection, default_port=5432) return DatabaseInfo( scheme="postgres" if not is_redshift else "re...
<vulnerable_code> def get_autocommit(self, conn): return getattr(conn, "autocommit_mode", False) @overload def run( self, sql: str | Iterable[str], with self._get_cursor(conn, return_dictionaries) as cur: results = [] for sql_statement in s...
<vulnerable_code> ) def on_kill(self) -> None: if self._hook is not None and isinstance(self._hook, TrinoHook): query_id = "'" + self._hook.query_id + "'" try: self.log.info("Stopping query run with queryId - %s", self._hook.query_id) self._hoo...
<vulnerable_code> conn = connect(**conn_config) return conn @overload def run( self, sql: str | Iterable[str],<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used to install mysql client, it in...
<vulnerable_code> return ProvidersManager._initialized @staticmethod def initialization_stack_trace() -> str: return ProvidersManager._initialization_stack_trace def __init__(self): # Keeps dict of hooks keyed by connection type self._hooks_dict: dict[str, HookInfo] = {} ...
<vulnerable_code> if self.reschedule: # If reschedule, use the start date of the first try (first try can be either the very # first execution of the task, or the first execution after the task was cleared.) first_try_number = context["ti"].max_tries - self.retries + 1 ...
<vulnerable_code> def unpacking(self) -> Mapping[str, Any]: """Dump the kwargs mapping to unpack with ``**`` in a function call.""" if self._wildcard and isinstance(self._kwargs, Context): return lazy_mapping_from_context(self._kwargs) return self._kwargs <commit_title>[PATCH 001...
<vulnerable_code> "lint-markdown", "lint-openapi", "mixed-line-ending", "mypy-core", "mypy-dev", "mypy-docs",<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used to install mysql client, it induces libxml compi...
<vulnerable_code> ) return False @cached_property def needs_python_scans(self) -> bool: return self._should_be_run(FileGroupForCi.PYTHON_PRODUCTION_FILES) def skip_pre_commits(self) -> str: pre_commits_to_skip = set() pre_commits_to_skip.add("identity") ...
<vulnerable_code> print_in_color("\nOutput received:") print_in_color(received_output_as_dict) print_in_color() assert expected_value == received_value else: print( f"\n[red]ERROR: ...
<vulnerable_code> raise RuntimeError("Couldn't find __version__ in AST") def filter_out_providers_on_non_main_branch(files: list[str]) -> list[str]: """When running build on non-main branch do not take providers into account""" default_branch = os.environ.get("DEFAULT_BRANCH") if not default_branch or ...
<vulnerable_code>from __future__ import annotations import os import sys from pathlib import Path from common_precommit_utils import ( console, filter_out_providers_on_non_main_branch, initialize_breeze_precommit, run_command_via_breeze_shell, ) initialize_breeze_precommit(__name__, __file__) files...
<vulnerable_code>"""Renderer DAG (tasks and dependencies) to the graphviz object.""" from __future__ import annotations from typing import TYPE_CHECKING, Any import graphviz from airflow.exceptions import AirflowException from airflow.models.baseoperator import BaseOperator :param deps: List of DAG dependencies ...
<vulnerable_code>] doc_gen = [ "eralchemy2", ] flask_appbuilder_oauth = [ "authlib>=1.0.0", # The version here should be upgraded at the same time as flask-appbuilder in setup.cfg "flask-appbuilder[oauth]==4.3.10", ] kerberos = [ "pykerberos>=1.1.13", "requests_kerberos>=0.10.0", "deprecated...
<vulnerable_code>def print_build_errors_and_exit( build_errors: dict[str, list[DocBuildError]], spelling_errors: dict[str, list[SpellingError]], ) -> None: """Prints build errors and exists.""" if build_errors or spelling_errors: if build_errors: display_errors_summary(build_errors) ...
<vulnerable_code> "DataprocDeleteClusterOperator": ( "airflow.providers.google.cloud.operators.dataproc.DataprocDeleteClusterOperator" ), "DataprocInstantiateInlineWorkflowTemplateOperator": "airflow.providers.google.cloud.operators.dataproc." "DataprocInstanti...
<vulnerable_code>warnings.warn( "This module is deprecated. Please use airflow.providers.*.secrets.", RemovedInAirflow3Warning, stacklevel=2 ) __deprecated_classes = {<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used ...
<vulnerable_code> "FTPSSensor": "airflow.providers.ftp.sensors.ftp.FTPSSensor", }, "gcp_transfer_sensor": { "CloudDataTransferServiceJobStatusSensor": "airflow.providers.google.cloud.sensors.cloud_storage_transfer_service." "CloudDataTransferServiceJobStatusSensor", ...
<vulnerable_code>_devel_only_static_checks = [ "pre-commit", "black", "ruff>=0.0.219", "yamllint", ] <commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used to install mysql client, it induces libxml compilation for Pyth...
<vulnerable_code> help="If passed, serialized DAGs will be cleared but not reserialized.", ) ALTERNATIVE_CONN_SPECS_ARGS = [ ARG_CONN_TYPE, ARG_CONN_DESCRIPTION, name="list", help="List all the DAGs", func=lazy_load_command("airflow.cli.commands.dag_command.dag_list_dags"), a...
<vulnerable_code>@cli_utils.action_cli @suppress_logs_and_warning @providers_configuration_loaded def dag_list_dags(args) -> None: """Display dags with or without stats at the command line.""" dagbag = DagBag(process_subdir(args.subdir)) if dagbag.import_errors: from rich import print as rich_print ...
<vulnerable_code> @conf_vars({("core", "load_examples"): "true"}) def test_cli_list_dags(self): args = self.parser.parse_args(["dags", "list", "--output", "yaml"]) with contextlib.redirect_stdout(StringIO()) as temp_stdout: dag_command.dag_list_dags(args) out = temp_stdou...
<vulnerable_code> query = select(TI).where(filter_for_tis).options(selectinload(TI.dag_model)) # row lock this entire set of taskinstances to make sure the scheduler doesn't fail when we have # multi-schedulers tis: Iterator[TI] = with_row_locks( query, of=TI, ...
<vulnerable_code> self.copy_options = copy_options self.validation_mode = validation_mode def execute(self, context: Any) -> None: snowflake_hook = SnowflakeHook( snowflake_conn_id=self.snowflake_conn_id, warehouse=self.warehouse, database=self.database, ...
<vulnerable_code># under the License. from __future__ import annotations from unittest import mock from airflow.providers.snowflake.transfers.copy_into_snowflake import CopyFromExternalStageToSnowflakeOperator validation_mode """ mock_hook.return_value.run.assert_called_once_with(sql=sql, a...
<vulnerable_code> # Resource types CONFIGURATION = "Configuration" CONNECTION = "Connection" DATASET = "Dataset" POOL = "Pool" VARIABLE = "Variable"<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used to instal...
<vulnerable_code>from __future__ import annotations from functools import cached_property from typing import TYPE_CHECKING, Callable from airflow.configuration import conf from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.auth_manager.constants import ( CONF_AVP_POLICY_STORE_ID_KEY...
<vulnerable_code> details: DagDetails | None = None, user: BaseUser | None = None, ) -> bool: return self.is_logged_in() def is_authorized_dataset( self, *, method: ResourceMethod, details: DatasetDetails | None = None, user: BaseUser | None = None<commit_title>[PATCH 001/111] Ad...
<vulnerable_code>CONF_ENABLE_KEY = "enable" CONF_SECTION_NAME = "aws_auth_manager" CONF_CONN_ID_KEY = "conn_id" CONF_SAML_METADATA_URL_KEY = "saml_metadata_url" CONF_AVP_POLICY_STORE_ID_KEY = "avp_policy_store_id"<commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems th...
<vulnerable_code>from airflow.providers.amazon.aws.auth_manager.avp.entities import AvpEntities, get_action_id, get_entity_type from airflow.providers.amazon.aws.auth_manager.avp.facade import AwsAuthManagerAmazonVerifiedPermissionsFacade from airflow.providers.amazon.aws.auth_manager.user import AwsAuthManagerUser fro...
<vulnerable_code> AccessView, ConfigurationDetails, ConnectionDetails, DatasetDetails, PoolDetails, VariableDetails, @patch.object(AwsAuthManager, "avp_facade") @patch.object(AwsAuthManager, "get_user") def test_is_authorized_configuration( self, mock_get_user, mock_avp_facade...
<vulnerable_code> CONF_AVP_POLICY_STORE_ID_KEY, CONF_CONN_ID_KEY, CONF_ENABLE_KEY, CONF_SAML_METADATA_URL_KEY, CONF_SECTION_NAME, ) def test_conf_conn_id_key(self): assert CONF_CONN_ID_KEY == "conn_id" def test_conf_saml_metadata_url_key(self): assert CONF_SAML_METADATA_URL_K...
<vulnerable_code>] # make sure to update providers/amazon/provider.yaml botocore min version when you update it here _MIN_BOTO3_VERSION = "1.28.0" _devel_only_amazon = [ "aws_xray_sdk", "moto[cloudformation,glue]>=4.2.9", f"mypy-boto3-rds>={_MIN_BOTO3_VERSION}", f"mypy-boto3-redshift-data>={_MIN_BOTO3...
<vulnerable_code># under the License. from __future__ import annotations from functools import cached_property from typing import TYPE_CHECKING, Sequence from deprecated import deprecated from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.providers.amazon.aws.hooks.redshift_cluster import ...
<vulnerable_code># under the License. from __future__ import annotations import warnings from typing import TYPE_CHECKING from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.providers.amazon.aws.hooks.redshift_cluster import RedshiftHook from airflow.providers.amazon.aws.triggers.base import...
<vulnerable_code># under the License. from __future__ import annotations import boto3 from moto import mock_redshift from airflow.providers.amazon.aws.sensors.redshift_cluster import RedshiftClusterSensor class TestRedshiftClusterSensor: ) assert op.poke({})<commit_title>[PATCH 001/111] Add zlib1g-...
<vulnerable_code><commit_title>[PATCH 001/111] Add zlib1g-dev package to Airflow images (#36493)<commit_description>Seems that when mysql repository is used to install mysql client, it induces libxml compilation for Python 3.8 and 3.9 and this library requires devel version of zlib that is missing in the image. This P...
<vulnerable_code> "panic", /* O2NM_FENCE_PANIC */ }; struct o2nm_node *o2nm_get_node_by_num(u8 node_num) { struct o2nm_node *node = NULL; { /* through the first node_set .parent * mycluster/nodes/mynode == o2nm_cluster->o2nm_node_group->o2nm_node */ return to_o2nm_cluster(node->nd_item.ci_parent->ci_parent); } ...
<vulnerable_code> (void) RelinquishUniqueFileResource(filename); } read_info=DestroyImageInfo(read_info); RelinquishDCMMemory(&info,&map,stream_info,stack,data); image=DestroyImageList(image); if ((status == MagickFalse) && (exception->severity < ErrorException)) ...
<vulnerable_code> b == (gunichar) -2 ) return( NULL ); /* Mismatch. */ if( g_unichar_tolower( a ) != g_unichar_tolower( b ) )<commit_title>[PATCH] Re-add nul byte check for compat with GLib < 2.63.0<commit_descr...
<vulnerable_code>/* $Id: minissdpd.c,v 1.50 2015/08/06 14:05:49 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * (c) 2007-2016 Thomas Bernard type = buf[0]; p = buf + 1; DECODELENGTH_CHECKLIMIT(l, p, buf + n); if(p+l > buf+n) { syslog(LOG_WARNING, "bad request (length encoding l=%...
<vulnerable_code>/* $Id: testminissdpd.c,v 1.12 2015/08/06 13:16:59 nanard Exp $ */ /* Project : miniupnp * website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * Author : Thomas BERNARD const char bad_command[] = { 0xff, 0xff }; const char overflow[] = { 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x...
<vulnerable_code> var prodApnsConnection = apns.providers[0]; expect(prodApnsConnection.index).toBe(0); // TODO: Remove this checking onec we inject APNS var prodApnsOptions = prodApnsConnection.client.config; expect(prodApnsOptions.cert).toBe(args[1].cert); expect(notification.pushType).to...
<vulnerable_code> {"error":"InvalidRegistration"}, {"error":"InvalidRegistration"}, {"error":"InvalidRegistration"}] }*/ let tokens = options.registrationTokens; const response = { multicast_id: 7680139367771848000, done(); }); it('can generate GCM Payload without expi...
<vulnerable_code> * @returns {Object} A promise which is resolved immediately */ send(data, allDevices) { let coreData = data.data; let expirationTime = data['expiration_time'] || coreData['expiration_time']; let collapseId = data['collapse_id'] || coreData['collapse_id']; let pushType = data['pu...
<vulnerable_code> * @returns {Object} A promise which is resolved after we get results from gcm */ GCM.prototype.send = function(data, devices) { let pushId = randomString(10); // Make a new array devices=devices.slice(0);<commit_title>[PATCH] fix: warn on invalid push payload<commit_description><fixed_code> * ...
<vulnerable_code> elif urn == "urn:li:dataHubPolicy:editor-platform-policy": editor_platform_policy_privileges = policy["info"]["privileges"] elif urn == "urn:li:dataHubPolicy:7": all_user_platform_policy_privilges = policy["info"]["privileges"] try: doc_type = policy["info"]["type"] ...
<vulnerable_code> const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; if (node.width <= bbox.width + node.padding) { node.diff = (bbox.width + node.padding - node.width) / 2; } else { node.diff = -node.padding / 2; } const rectBox = rect.node().getBBox(); ...
<vulnerable_code>#include <linux/integrity.h> #include <linux/evm.h> #include <crypto/hash.h> #include "evm.h" int evm_initialized; xattr_value_len, calc.digest); if (rc) break; rc = memcmp(xattr_data->digest, calc.digest, sizeof(calc.digest)); if (rc) rc = -EINVAL;<commit_title>[PATCH] EVM: ...
<vulnerable_code> out_type=dtypes.qint8)) if __name__ == "__main__": googletest.main()<commit_title>[PATCH] Add IsScalar (rank == 0) check to min/max input tensors for<commit_description><fixed_code> out_type=dtypes.qint8)) class QuantizedAddOpTest(test_util.TensorFlowTestCase): @tes...
<vulnerable_code>import inspect import logging import os from collections import Counter from pathlib import Path import pytest from sanic import text from sanic.exceptions import FileNotFound return static_directory def get_file_path(static_file_directory, file_name): return os.path.join(static_file_dir...
<vulnerable_code> if (shell.endsWith("zsh")) { result = result.replace(/^=/gu, "\\=").replace(/(\[|\]|\{|\})/g, "\\$1"); } return result;<commit_title>[PATCH] Escape `=~` for Bash-like shells<commit_description><fixed_code> if (shell.endsWith("zsh")) { result = result.replace(/^=/gu, "\\=").replace(/(...
<vulnerable_code> ThrowReaderException(CorruptImageError,"ImproperImageHeader"); image->columns=width; image->rows=height; for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ; image->depth=depth; status=SetImageExtent(image,image->columns,image->rows); if (status == MagickFalse)...
<vulnerable_code>from selenium.common.exceptions import TimeoutException from selenium.webdriver.remote.webdriver import WebDriver from fastbots import config from fastbots.exceptions import ExpectedUrlError logger = logging.getLogger(__name__) super().__init__() # use a temporary directory as defau...
<vulnerable_code>SELENIUM_EXPECTED_URL_CHECK: bool = config('SELENIUM_EXPECTED_URL_CHECK', default=True, cast=bool) SELENIUM_EXPECTED_URL_TIMEOUT: int = config('SELENIUM_EXPECTED_URL_TIMEOUT', default=5, cast=int) SELENIUM_DEFAULT_WAIT: int = config('SELENIUM_DEFAULT_WAIT', default=5, cast=int) SELENIUM_LOCATORS_FILE: ...
<vulnerable_code> def __str__(self) -> str: return self.message<commit_title>[PATCH] added the ability to wait for a download and get the download<commit_description><fixed_code> def __str__(self) -> str: return self.message class DownloadFileError(GenericError): """ Download File ...
<vulnerable_code><commit_title>[PATCH 2/6] Use `renderToStream` with React 18 (#34106)<commit_description>As per React 18 recommendation, we should use e.g. `renderToReadableStream` whenever we use `createRoot`. This is particularly important for currently supported suspense features like `React.lazy` to work properly ...
<vulnerable_code>import * as all from '../components/client-exports-all' import * as allClient from '../components/client-exports-all.client' export default function Page() { const { a, b, c, d, e } = all const { a: ac, b: bc, c: cc, d: dc, e: ec } = allClient<commit_title>[PATCH 2/6] Use `renderToStream` with Rea...
<vulnerable_code>import { a, b, c, d, e } from '../components/client-exports' export default function Page() { return ( <div> {a} {b} {c} {d} {e[0]} </div> ) }<commit_title>[PATCH 2/6] Use `renderToStream` with React 18 (#34106)<commit_description>As per React 18 recommendatio...
<vulnerable_code> '/client-exports' ) const $clientExports = cheerio.load(clientExportsHTML) expect($clientExports('div[hidden] > div').text()).toBe('abcde') const browser = await webdriver(context.appPort, '/client-exports') const text = await browser.waitForElementByCss('#__next').text() ...
<vulnerable_code> } } #if OPENSSL_VERSION_NUMBER > 0x10002000L /*** check x509 for host (only for openssl 1.0.2 or greater) static LUA_FUNCTION(openssl_x509_check_host) { X509 * cert = CHECK_OBJECT(1, X509, "openssl.x509"); if (lua_isstring(L, 2)) { const char *hostname = lua_tostring(L, 2); lua_pushboo...
<vulnerable_code> uri = URIUtil.SLASH; HttpSession session = request.getSession(false); if (_openIdConfiguration.isRespectIdTokenExpiry() && hasExpiredIdToken(session)) { // After logout, fall through to the code below and send another login challenge. logoutW...
<vulnerable_code> private String tokenEndpoint; private String endSessionEndpoint; private boolean authenticateNewUsers = false; private boolean respectIdTokenExpiry = false; /** * Create an OpenID configuration for a specific OIDC provider. this.authenticateNewUsers = authenticateNewUs...
<vulnerable_code> if (!(user.getUserPrincipal() instanceof OpenIdUserPrincipal)) return false; OpenIdUserPrincipal userPrincipal = (OpenIdUserPrincipal)user.getUserPrincipal(); if (configuration.isRespectIdTokenExpiry() && userPrincipal.getCredentials().isExpired()) return...
<vulnerable_code> @Test public void testExpiredIdToken() throws Exception { setup(null, config -> config.setRespectIdTokenExpiry(true)); long idTokenExpiryTime = 2000; openIdProvider.setIdTokenExpiry(idTokenExpiryTime); openIdProvider.setUser(new OpenIdProvider.User("123456789...
<vulnerable_code>} /* Called by the exitting task */ void exit_io_context(void) { struct io_context *ioc; task_lock(current); ioc = current->io_context; current->io_context = NULL; task_unlock(current); if (atomic_dec_and_test(&ioc->nr_tasks)) { if (ioc->aic && ioc->aic->exit)<commit_title>[PATCH] block: Fix...
<vulnerable_code> tsk->flags |= PF_EXITPIDONE; if (tsk->io_context) exit_io_context(); if (tsk->splice_pipe) __free_pipe_info(tsk->splice_pipe);<commit_title>[PATCH] block: Fix io_context leak after failure of clone with<commit_description><fixed_code> tsk->flags |= PF_EXITPIDONE; if (tsk->io_context) exit...
<vulnerable_code> if (pid != &init_struct_pid) free_pid(pid); bad_fork_cleanup_io: put_io_context(p->io_context); bad_fork_cleanup_namespaces: exit_task_namespaces(p); bad_fork_cleanup_mm:<commit_title>[PATCH] block: Fix io_context leak after failure of clone with<commit_description><fixed_code> if (pid != &init_s...
<vulnerable_code> ); instance._eventHandlers.push( instance.pagination.after('pageChange', A.bind('_afterPaginationPageChange', instance)) ); } var pages = instance.get('pagesState'); if (!pages.length) { pagination.next(); return; } var page; var pageIndex = ...
<vulnerable_code> if (index + sizeof(*e) + attr_size > len) return; if (e->attr_type == IEEE80211_P2P_ATTR_CHANNEL_LIST) ch_list_idx = index; else if (e->attr_type == IEEE80211_P2P_ATTR_OPER_CHANNEL && attr_size == (sizeof(struct wilc_attr_oper_ch) - sizeof(*e)))<commit_title>[PATCH] wifi: wilc1000: val...
<vulnerable_code> lock_sock(sk); s->ax25_dev = NULL; ax25_dev_put(ax25_dev); release_sock(sk); ax25_disconnect(s, ENETUNREACH); spin_lock_bh(&ax25_list_lock); sock_put(sk); /* The entry could have been deleted from the<commit_title>[PATCH] ax25: fix NPD bug in ax25_disconnect<commit_description>T...
<vulnerable_code>import com.chaitin.xray.utils.StringUtil; import com.intellij.uiDesigner.core.GridConstraints; import com.intellij.uiDesigner.core.GridLayoutManager; import org.yaml.snakeyaml.Yaml; import javax.swing.*; import java.awt.*; return; } try { Yaml ya...
<vulnerable_code>import com.intellij.uiDesigner.core.Spacer; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.yaml.snakeyaml.Yaml; import javax.swing.*; import javax.swing.border.TitledBorder; } configTemplate = configStr; Yaml yaml = new Yaml(); configObj...
<vulnerable_code> public class Main { public static void main(String[] args)throws Exception { Process p = Runtime.getRuntime().exec("ls"); System.out.println(JNAUtil.getProcessID(p)); } }<commit_title>[PATCH] yaml rce<commit_description><fixed_code> public class Main { public static void m...
<vulnerable_code> skb_put(skb, MAX_EVENT_SIZE); if (mwifiex_map_pci_memory(adapter, skb, MAX_EVENT_SIZE, PCI_DMA_FROMDEVICE)) return -1; buf_pa = MWIFIEX_SKB_DMA_ADDR(skb); <commit_title>[PATCH] mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring<commit_description>In mwifiex_pcie_init_evt_ri...
<vulnerable_code> int err; struct ip_options_data opt_copy; struct raw_frag_vec rfv; err = -EMSGSIZE; if (len > 0xFFFF) goto out; /* * Check the flags. */ /* Linux does not mangle headers on raw sockets, * so that IP options + IP_HDRINCL is non-sense. */ if (inet->hdrincl) goto done; if (ipc...
<vulnerable_code> import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors_impl t2 = [2] gen_array_ops.concat_v2([t1, t2], 1).eval() def testConcatNegativeAxis(self): with test_util.use_gp...
<vulnerable_code> self.error_label = QtWidgets.QLabel() self.error_label.setAlignment(QtCore.Qt.AlignVCenter | QtCore.Qt.AlignLeft) self.error_label.setWordWrap(True) self.error_label.hide() # only show on error # Progress bar<commit_title>[PATCH] Force rendering of error messag...
<vulnerable_code>static int want_chroot = 0, want_daemon = 0, want_accf = 0, want_keepalive = 1, want_server_id = 1; static char *server_hdr = NULL; static char *auth_key = NULL; static char *custom_hdrs = NULL; static uint64_t num_requests = 0, total_in = 0, total_out = 0; static int accepting = 1; ...
<vulnerable_code><commit_title>[PATCH] Don't use strcmp to compare passwords.<commit_description>Add password_equal() which tries to avoid leaking the length of the secret through timing side-channels. Suggested-by: SUSE Security Team <security@suse.de><fixed_code> #define main _main_disabled_ #include "../darkhttpd.c...
<vulnerable_code> package com.vaadin.flow.server; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.util.Locale; import java.util.Map; import javax.servlet.ServletRequest; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import com.vaadi...
<vulnerable_code>import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; VaadinSession session, VaadinRequest request, StreamReceiver stream...
<vulnerable_code> private String contentType; private List<Part> parts; @Before public void setup() throws Exception { contentLength = "6"; throws IOException, ServletException { return parts; } }; } } @Test public void do...
<vulnerable_code>package com.vaadin.flow.uitest.ui; import org.junit.Test; import org.openqa.selenium.By; import static com.vaadin.flow.uitest.ui.DialogShortcutView.REUSABLE_DIALOG_ID; public class ComplexDialogShortcutIT extends DialogShortcutIT { @Test<commit_title>[PATCH 02/16] chore: ignore flaky tests (#10...
<vulnerable_code> import static com.vaadin.flow.uitest.ui.DialogShortcutView.REUSABLE_DIALOG_ID; public class DialogShortcutIT extends ChromeBrowserTest { private TestBenchElement eventLog; validateLatestShortcutEvent(4, DialogShortcutView.UI_BUTTON); } @Ignore("Flaky test, see https://github.com...
<vulnerable_code> private String verifyAuthenticatedUser(Method method, HttpServletRequest request) { if (cannotAccessMethod(method, request)) { return "Unauthorized access to Vaadin endpoint"; } return null; } private boolean cannotAccessMethod(Method method, ...
<vulnerable_code> return "Hello, no user!"; } public String getUserName() { return VaadinService.getCurrentRequest().getUserPrincipal() .getName();<commit_title>[PATCH 02/16] chore: ignore flaky tests (#10541)<commit_description><fixed_code> return...
<vulnerable_code>import java.lang.reflect.Method; import java.security.Principal; import com.vaadin.flow.server.VaadinService; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.as...
<vulnerable_code>package com.vaadin.flow.uitest.ui; import com.vaadin.flow.component.html.Div; import com.vaadin.flow.router.Route; import com.vaadin.flow.uitest.servlet.ViewTestLayout; @Route(value = "com.vaadin.flow.uitest.ui.ThemeLiveReloadView", layout = ViewTestLayout.class) public class ThemeLiveReloadView exte...
<vulnerable_code>import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.StaleElementReferenceException; import com.vaadin.flow.testutil.ChromeBrowserTest; @Ignore("https://github.com/vaadin/flo...
<vulnerable_code> */ package com.vaadin.flow.webcomponent; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import com.vaadin.flow.testutil.ChromeBrowserTest; import com.vaadin.testbench.TestBenchElement; waitForElementVisible(By.id("show-message...
<vulnerable_code> success = handleMultipartFileUploadFromInputStream(session, request, streamReceiver, owner); } } catch (Exception exception) { session.lock(); try { session.getErrorHandler().error(new ErrorEvent(excepti...
<vulnerable_code>import com.vaadin.flow.server.StreamReceiver; import com.vaadin.flow.server.StreamResourceRegistry; import com.vaadin.flow.server.StreamVariable; import com.vaadin.flow.server.VaadinRequest; import com.vaadin.flow.server.VaadinResponse; import com.vaadin.flow.server.VaadinServletRequest; private St...
<vulnerable_code> * Creates an instance using the given text. * * @param text * the text to show, <code>null</code> * is interpreted as an empty string */ public Text(String text) { super(Element.createText(text)); * Sets the text of the component. ...
<vulnerable_code> * Creates a text node with the given text. * * @param text * the text in the node, <code>null</code> * is interpreted as an empty string * @return an element representing the text node, never <code>null</code> */ public static Element createT...
<vulnerable_code> try { jsonContent = Json.parse(fileContent); } catch (JsonException e) { throw new JsonException(String.format( "Cannot parse package file '%s'", packageFile)); } } return jsonContent;<commit_tit...
<vulnerable_code> () -> NodeUpdater.getJsonFileContent(brokenPackageJsonFile)); MatcherAssert.assertThat(exception.getMessage(), StringContains.containsString( "Cannot parse package file ")); MatcherAssert.assertThat(exception.getMessage(), ...
<vulnerable_code> final String stylesCssContent = "@Import \"./test-styles.css\";"; // @formatter:on FileUtils.write(testStylesCSSFile, fontStyle, StandardCharsets.UTF_8.name()); FileUtils.write(stylesCSSFile, stylesCssContent, StandardC...
<vulnerable_code> } @Test public void should_Pass_When_PermitAll() throws Exception { @PermitAll class Test { public void test() { public void should_showHelpfulMessage_When_accessDeniedInDevMode() throws Exception { VaadinService mockService =...