text
stringlengths
79
3.72M
<vulnerable_code><commit_title>[PATCH 1/3] - Fix several XSS vulnerabilities<commit_description><fixed_code> export default function (html) { // Turn < ? > into HTML entities, so data doesn't get interpreted by the browser return html.replace(/&/g, '&amp;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;') ...
<vulnerable_code> } else if (!memcmp(cheaderBuf.pData_ + 4, "iCCP", 4)) { zlibToDataBuf(cdataBuf.pData_ +12+1,dataOffset-13,iccProfile_); // +1 = 'compressed' flag #ifdef DEBUG std::cout << "Exiv2::PngImage::readMetadata: Found iCCP ...
<vulnerable_code>#include "image_int.hpp" #include "basicio.hpp" #include "error.hpp" #include "futils.hpp" #include "types.hpp" } ++iccOffset; // +1 = 'compressed' flag zlibToDataBuf(cdataBuf.pData_ +iccOffset,dataOffset-iccOffset,iccProfile_); #ifdef DEBU...
<vulnerable_code> { // The ICC profile name can vary from 1-79 characters. uint32_t iccOffset = 0; while (iccOffset < 80 && iccOffset < dataOffset) { const byte* profileName = cdataBuf.pData_ + iccOffset; ...
<vulnerable_code> addSetFromUserDefined: function (customKey, customType) { try { if (in_array(customKey.getValue(), this.disallowedKeys)) { Ext.MessageBox.alert(t("error"), t("name_is_not_allowed")); } this.add(customKey.getValue(), customType.getValue(),...
<vulnerable_code> } } /* init everything to 0, NULL, default values before calling anything that may fail so that destructor has a "good" state to cleanup InitCipherSpecs(&ssl->specs); /* all done with init, now can return errors, call other stuff */ if (!writeDup) { /* arrays */ s...
<vulnerable_code> int err = WOLFSSL_FATAL_ERROR; WOLFSSL_ENTER("wolfSSL_negotiate"); #ifndef NO_WOLFSSL_SERVER if (ssl->options.side == WOLFSSL_SERVER_END) { #ifdef WOLFSSL_TLS13 (void)ret; WOLFSSL_ENTER("SSL_connect()"); #ifdef HAVE_ERRNO_H errno = 0; #endif ...
<vulnerable_code>#endif /** Mark an extension to be sent back to the client. */ void TLSX_SetResponse(WOLFSSL* ssl, TLSX_Type type); void TLSX_SetResponse(WOLFSSL* ssl, TLSX_Type type) { TLSX *extension = TLSX_Find(ssl->extensions, type); /* No upgrade allowed. */ if (versionIsGreater(is...
<vulnerable_code> WOLFSSL_ENTER("wolfSSL_connect_TLSv13()"); #ifdef HAVE_ERRNO_H errno = 0; #endif if (ssl->options.side != WOLFSSL_CLIENT_END) { ssl->error = SIDE_ERROR; return WOLFSSL_FATAL_ERROR; } #ifdef WOLFSSL_WOLFSENTRY_HOOKS if ((ssl->ConnectFilter != NULL) && ...
<vulnerable_code>#include "udp.h" #include "ah.h" /* NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp */ /* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */ } opt = (const struct rpl_dio_genoption *)(((const char *)opt) + optlen); length -= optlen; ...
<vulnerable_code>{ struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); ldata->line_start = ldata->read_tail; if (!L_ICANON(tty) || !read_cnt(ldata)) { return put_user(tty_chars_in_buffer(tty), (int __user *) ...
<vulnerable_code> lineNumbers: true }, themeConfig: { lastUpdated: "Last Updated", nav: [{ text: "Back to Tendermint", link: "https://tendermint.com" }], sidebar: [ {<commit_title>[PATCH 01/44] docs: update ecosystem.json: add Rust ABCI (#2945)<commit_description><fixed_code> lineNumbers: t...
<vulnerable_code> lineNumbers: true }, themeConfig: { lastUpdated: true, algolia: { apiKey: '59f0e2deb984aa9cdf2b3a5fd24ac501',<commit_title>[PATCH 01/44] docs: update ecosystem.json: add Rust ABCI (#2945)<commit_description><fixed_code> lineNumbers: true }, themeConfig: { repo: "tender...
<vulnerable_code> indexName: 'tendermint', debug: false }, nav: [{ text: "Back to Tendermint", link: "https://tendermint.com" }], sidebar: [ { title: "Introduction", "/introduction/what-is-tendermint" ] }, { title: "Tendermint Core", col...
<vulnerable_code> var slash = '/'; var backslash = /\\/g; var enclosure = /[{[][^/\r\n\u2028\u2029]*\/.*[}\]]$/; var globby = /(^|[^\\])([{[]|\([^)]+$)/; var escaped = /\\([!*?|[\](){}])/g; <commit_title>[PATCH] fix: Modify regex to accept newlines and to avoid ReDoS by<commit_description><fixed_code> var slash = '/';...
<vulnerable_code>var expect = require('expect'); var isWin32 = require('os').platform() === 'win32'; var performance = require('perf_hooks').performance; describe('glob-parent', function () { it('should strip glob magic to return parent path', function (done) { expect(gp('.')).toEqual('.'); done(); }); ...
<vulnerable_code>const propertyAppender = require('./property-appender').propertyAppender; const propertyWriter = require('./property-writer').propertyWriter; const SECTION = Symbol('SECTION'); function PropertiesReader (sourceFile, encoding, options = {}) { if (expanded.length >= 1 && typeof source[step] === '...
<vulnerable_code><commit_title>[PATCH] Test case covering the use of `__proto__` as a section name<commit_description><fixed_code> const {createTestContext} = require('./__fixtues__/create-test-context'); const propertiesReader = require('../'); describe('prototype-pollution', () => { let context; beforeEach(a...
<vulnerable_code> if has_max_attempts and td_last_login < td_max_blocked: minutes_remaining = \ (td_max_blocked - td_last_login).seconds // 60 + 1 return True, ( f"Your account is blocked for the next {minutes_remaining} " "minutes due to fa...
<vulnerable_code>""" Resources below '/<api_base>/token' """ from __future__ import print_function, unicode_literals import logging import datetime as dt from flask import request, g from flask_jwt_extended import ( jwt_required, create_access_token, log.info(f"Succesfull login from {username}") ...
<vulnerable_code> with app.app_context(): try: self.mail.send(msg) except ConnectionRefusedError as e: log.error("Mailserver error!") log.debug(e) <commit_title>[PATCH 2/3] updated logging<commit_description><fixed_code> with app.app...
<vulnerable_code> log.warning(f'User {user.username} is locked, but does not have' 'an email registered. So no message has been send.') template_vars = {'firstname': user.firstname, 'number_of_allowed_attempts': max_n_attempts, ...
<vulnerable_code> def user_login(self, username: str, password: str) -> Union[dict, db.User]: """Returns user a message in case of failed login attempt.""" log.info(f"Trying to login '{username}'") if db.User.username_exists(username): user = db.User.get_by_username(username) ...
<vulnerable_code> static void mpeg4_encode_gop_header(MpegEncContext *s) { int hours, minutes, seconds; int64_t time; put_bits(&s->pb, 16, 0);<commit_title>[PATCH] avcodec/mpeg4videoenc: Use 64 bit for times in<commit_description><fixed_code> static void mpeg4_encode_gop_header(MpegEncContext *s) { in...
<vulnerable_code>package retrofit2; import java.io.IOException; import javax.annotation.Nullable; import okhttp3.FormBody; import okhttp3.Headers; { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; private static final String PATH_SEGMENT_ALWAYS_ENCODE_SET = " \"<>^`{}|\\?#"; ...
<vulnerable_code> assertThat(request.body()).isNull(); } @Test public void pathParamRequired() { class Example { @GET("/foo/bar/{ping}/") // return buildRequest(cls, retrofitBuilder, args); } }<commit_title>[PATCH] Forbid path traversal ('.' and '..') as @Path parameters.<commit_description>The...
<vulnerable_code> } if (authToken) { request.set('Authorization', `Bearer ${authToken}`); // if (__SERVER__) request.set('Cookie', `auth_token=${authToken}`); } request.set('Accept', 'application/json');<commit_title>[PATCH] Cleanup<commit_description><fix...
<vulnerable_code> mm_init_cpumask(mm); mm_init_aio(mm); mm_init_owner(mm, p); mmu_notifier_mm_init(mm); init_tlb_flush_pending(mm); #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS<commit_title>[PATCH] fork: fix incorrect fput of ->exe_file causing use-after-free<commit_description>Commit 7c051267...
<vulnerable_code> if (parents) mkdir_parents(path, 0755); fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, mode > 0 ? mode : 0644); if (fd < 0) return -errno; <commit_title>[PATCH] basic: fix touch() creating files with 07777 mode<commit_description>mode_t is ...
<vulnerable_code><commit_title>[PATCH] add tests<commit_description><fixed_code> /* * Copyright 2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
<vulnerable_code> *******************************************************************************/ package org.fusesource.hawtjni.runtime; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import jav...
<vulnerable_code> this timer. This function is called for every incoming IP packet to check for such SYNs. */ #define TCP_SYN 0x02 if(UIP_IP_BUF->proto == UIP_PROTO_TCP && (UIP_TCP_BUF->flags & TCP_SYN) == TCP_SYN) { start_periodic_tcp_timer(); }<commit_title>[PATCH] Check whether we have a full ...
<vulnerable_code> }, loadDevices: function() { const audioOutDeviceId = SettingsStore.getValue("webrtc_audiooutput"); const audioDeviceId = SettingsStore.getValue("webrtc_audioinput"); const videoDeviceId = SettingsStore.getValue("webrtc_videoinput"); Matrix.setMatrixCallAudioOu...
<vulnerable_code>/** * Apply a JSON merge patch onto a document * https://tools.ietf.org/html/rfc7396 * @param {Object} doc - JSON object document * @param {Object} patch - JSON object patch * @return {Object} - JSON object document */ module.exports = function apply(doc, patch) { if (typeof patch ...
<vulnerable_code> assert.deepEqual(doc, {}); }); // https://github.com/lodash/lodash/pull/4337 it("prevents prototype pollution", () => { let doc = {}; const patch = { __proto__: { foobar: true } }; doc = apply(doc, patch); assert.deepEqual(doc, {}); }); // https://github.com/lodash/loda...
<vulnerable_code> void dump_mm(const struct mm_struct *mm) { pr_emerg("mm %px mmap %px seqnum %d task_size %lu\n" #ifdef CONFIG_MMU "get_unmapped_area %px\n" #endif "tlb_flush_pending %d\n" "def_flags: %#lx(%pGv)\n", mm, mm->mmap, mm->vmacache_seqnum, mm->task_size, #ifdef CONFIG_MMU mm->get_unmapped_area, ...
<vulnerable_code>#endif #define VMACACHE_HASH(addr) ((addr >> VMACACHE_SHIFT) & VMACACHE_MASK) /* * Flush vma caches for threads that share a given mm. * * The operation is safe because the caller holds the mmap_sem * exclusively and other threads accessing the vma cache will * have mmap_sem held at least for rea...
<vulnerable_code> static void tcp_internal_pacing(struct sock *sk, const struct sk_buff *skb) { u64 len_ns; u32 rate; len_ns = (u64)skb->len * NSEC_PER_SEC; do_div(len_ns, rate); hrtimer_start(&tcp_sk(sk)->pacing_timer, ktime_add_ns(ktime_get(), len_ns), HRTIMER_MODE_ABS_PINNED_SOFT); sock_hold(...
<vulnerable_code>package org.xwiki.livetable; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.classes.StaticListClass; import com.xpn.xwiki.plugin.tag.TagPluginApi; ...
<vulnerable_code>} //static void parse_capcode(struct Flex * flex, uint32_t aw1, uint32_t aw2) { static void parse_capcode(struct Flex * flex, uint32_t aw1) { if (flex==NULL) return; flex->Decode.long_address = (aw1 < 0x8001L) || (aw1 > 0x1E0000L) || (aw1 > 0x1E7FFEL); ///if (flex->Decode.long_address...
<vulnerable_code> for (size_t i = 0; i < _data->lineBuffers.size(); i++) { _data->lineBuffers[i]->buffer = (char *) EXRAllocAligned(_data->lineBufferSize*sizeof(char),16); } } _data->nextLineBufferMinY = _data->minY - 1;<commit_title>[PATCH 3/3] test ch...
<vulnerable_code> int gChan = _cscSets[csc].idx[1]; int bChan = _cscSets[csc].idx[2]; LossyDctDecoderCsc decoder (rowPtrs[rChan],<commit_title>[PATCH 3/3] test channels are DCT compressed before DWA decompression<commit_description><fixed_code> int gChan = _cscSets[c...
<vulnerable_code> goto end; } } if (dirty && mod_y == 5) { orig_height = height; if (output_count++ == 0) { if (SIXEL_FAILED(status)) { goto error; } pixels -= (6 * width * 3); height = or...
<vulnerable_code> const CodeBlock *codeBlock, OptValue<hbc::DebugSourceLocation> location) { RuntimeModule *runtimeModule = codeBlock->getRuntimeModule(); if (location) { auto debugInfo = runtimeModule->getBytecode()->getDebugInfo(); return StringPrimitive::createEfficient( runtime, debugInfo...
<vulnerable_code><commit_title>[PATCH] Avoid accessing the DebugInfo for BCProviderLazy<commit_description>Summary: Fixes CVE-2023-24832 by avoiding accessing the DebugInfo for lazy CodeBlocks. Reviewed By: mattbfb Differential Revision: D42688370 fbshipit-source-id: fc7eb4168b1f21549cbfd080a9e010c6d8609256<fixed_co...
<vulnerable_code>import ItemList from 'flarum/common/utils/ItemList'; import UserPage from 'flarum/forum/components/UserPage'; import LinkButton from 'flarum/common/components/LinkButton'; export default () => { attributes(); function message() { extend(UserControls, 'userControls', function (items, user) { i...
<vulnerable_code><commit_title>[PATCH] fix: prevent starting a PD with users blocking them (#175)<commit_description><fixed_code> import app from 'flarum/forum/app'; export default function canStartPrivateDiscussion(recipient) { return ( app.session.user && app.session.user.id() !== recipient.id() && app...
<vulnerable_code>import listItems from 'flarum/common/helpers/listItems'; import PrivateDiscussionList from './discussions/PrivateDiscussionList'; import PrivateComposing from './PrivateComposing'; export default class PrivateDiscussionsUserPage extends UserPage { oninit(vnode) { const items = new ItemList(); ...
<vulnerable_code> st = os.statvfs(mountpoint) iu = st.f_files - st.f_ffree iup = 0 if iu > 0 and st.f_files > 0: iup = math.ceil(100 * float(iu) / float(st.f_files)) inodes = RunnableNode('inodes', method=lambda: (st.f_files, 'inodes')) ...
<vulnerable_code> return localize("reader.read.already.called"); } // obj builder messages static String OBJBUILDER_NAME_NULL() {<commit_title>[PATCH] Exception message moved to messages bundle.<commit_description><fixed_code> return localize("reader.read.already.called"); } // JSO...
<vulnerable_code> */ abstract class JsonNumberImpl implements JsonNumber { private static final String SCALE_LIMIT_EXCEPTION_MESSAGE = "Scale value %d of this BigInteger exceeded maximal allowed absolute value of %d"; private int hashCode; private final int bigIntegerScaleLimit; r...
<vulnerable_code> */ public class JsonBigDecimalScaleLimitTest extends TestCase { public JsonBigDecimalScaleLimitTest(String testName) { super(testName); } @Override protected void setUp() { System.setProperty(JsonConfig.MAX_BIGINTEGER_SCALE, "50000"); } @Override ...
<vulnerable_code>import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; import java.util.Map; import jakarta.json.Json; // π as JsonNumber with 1101 source characters private static final String Π_1101 = Π_1100 + "5"; public JsonNumberTest(String testName) { super...
<vulnerable_code> gboolean is_mirror; gboolean is_commit_only; gboolean is_untrusted; GPtrArray *dirs; return FALSE; } static gboolean scan_dirtree_object (OtPullData *pull_data, const char *checksum, &file_is_stor...
<vulnerable_code>static char *opt_remote; static gboolean opt_disable_fsync; static gboolean opt_untrusted; static gboolean opt_require_static_deltas; static gboolean opt_gpg_verify; static gboolean opt_gpg_verify_summary; { "remote", 0, 0, G_OPTION_ARG_STRING, &opt_remote, "Add REMOTE to refspec", "REMOTE" }, { "d...
<vulnerable_code>static gboolean opt_disable_static_deltas; static gboolean opt_require_static_deltas; static gboolean opt_untrusted; static char** opt_subpaths; static char** opt_http_headers; static char* opt_cache_dir; { "mirror", 0, 0, G_OPTION_ARG_NONE, &opt_mirror, "Write refs suitable for a mirror", NULL }, ...
<vulnerable_code> for i in range(0, len(val), 2): self.assertAllEqual(val[i], val[i + 1]) def _GetSvdOpTest(dtype_, shape_, use_static_shape_, compute_uv_, full_matrices_):<commit_title>[PATCH] Fix empty batch issue in svd.<commit_description>If there are zero batches, the GPU kernel previo...
<vulnerable_code> &njs_string_object, &njs_string_object, &njs_string_object, }; vm->retval = *types[value->type];<commit_title>[PATCH] Added missing element in typeof table for DataView() type.<commit_description>Previously, typeof operation for DataView object resulted in out of bounds...
<vulnerable_code> { njs_str("(new DataView(new ArrayBuffer(3)))"), njs_str("[object DataView]") }, { njs_str("(new DataView(new ArrayBuffer(3))).buffer"), njs_str("[object ArrayBuffer]") }, <commit_title>[PATCH] Added missing element in typeof table for DataView() type.<commit_description>Previously...
<vulnerable_code> XWikiDocument.backupContext(backup, context); try { sxDocument.setAsContextDoc(context); return processSx(spaceNames, name, queryString, context, exportContext); } finally { XWikiDocument.restoreContext(backup, context); } } p...
<vulnerable_code> */ public static boolean verifyResponse(Response response, String requestUrl, HttpServletRequest request) { if (!response.isSignatureValid()) { debug.message("verifyResponse: Response's signature is invalid."); return false; List assertions = null; ...
<vulnerable_code><commit_title>[PATCH] add quadratic underscore test<commit_description><fixed_code> module.exports = { markdown: `${'_'.repeat(101)} a`, html: `<p>${'_'.repeat(101)} a</p>` };
<vulnerable_code> #ifndef CONFIG_USER_ONLY env->pc = 0x1c000000; #endif restore_fp_status(env);<commit_title>[PATCH] target/loongarch: Clean up tlb when cpu reset<commit_description>We should make sure that tlb is clean when cpu reset. Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20220705070950....
<vulnerable_code> } else { /* if we are the first line after comment header, we allocate our data structures */ if ( l_header_read == 0 ) { if ( sscanf(l_line, "%u %u %u", o_row_count, o_column_count, o_element_count) == 3 ) { /* allocate CSC datastructure matching mtx file */ ...
<vulnerable_code> } else { /* if we are the first line after comment header, we allocate our data structures */ if ( l_header_read == 0 ) { if ( sscanf(l_line, "%u %u %u", o_row_count, o_column_count, o_element_count) == 3 ) { /* allocate CSC data structure matching mtx file */ ...
<vulnerable_code> } else { /* if we are the first line after comment header, we allocate our data structures */ if ( l_header_read == 0 ) { if ( sscanf(l_line, "%u %u %u", o_row_count, o_column_count, o_element_count) == 3 ) { /* allocate CSC data-structure matching mtx file */ ...
<vulnerable_code> parse_type, ) from vyper.utils import fourbytes_to_int, keccak256, mkalphanum # Function argument return input_name + " -> " + str(self.output_type) + ":" return input_name + ":" #@property #def abi_signature(self): # assert not self.internal, "abi_signatures o...
<vulnerable_code># also allocate the ones that live in memory (i.e. kwargs) def _register_function_args(context: Context, sig: FunctionSignature): # generate kwarg handlers. # since they might come in thru calldata or be default, # allocate them in memory and then fill it in based on calldata or default, ...
<vulnerable_code> return 0; } int jas_stream_read(jas_stream_t *stream, void *buf, int cnt) { int n; return n; } int jas_stream_write(jas_stream_t *stream, const void *buf, int cnt) { int n; return 0; } char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize) { int c; return buf; } int jas_stream_g...
<vulnerable_code>* Box constructor. \******************************************************************************/ jp2_box_t *jp2_box_create(int type) { jp2_box_t *box; jp2_boxinfo_t *boxinfo; if (!(box = jas_malloc(sizeof(jp2_box_t)))) { return 0; } memset(box, 0, sizeof(jp2_box_t)); box->type = type; box...
<vulnerable_code>from django.contrib import admin from .models import MFAKey @admin.register(MFAKey) class MFAKeyAdmin(admin.ModelAdmin):<commit_title>[PATCH] fix bypass via admin login<commit_description>inspired by django-two-factor-auth<fixed_code> from django.contrib import admin from django.contrib.auth import ...
<vulnerable_code><commit_title>[PATCH] fix bypass via admin login<commit_description>inspired by django-two-factor-auth<fixed_code> from django.apps import AppConfig class TwoFactorConfig(AppConfig): name = 'mfa' verbose_name = 'Multi Factor Authentication' def ready(self): from .admin import pat...
<vulnerable_code> self.assertEqual(res.url, '/') class QRCodeTest(TestCase): def test_is_svg(self): code = get_qrcode('some_data')<commit_title>[PATCH] fix bypass via admin login<commit_description>inspired by django-two-factor-auth<fixed_code> self.assertEqual(res.url, '/') class PatchAd...
<vulnerable_code>from django.contrib.auth.decorators import login_required from django.contrib.auth.views import LogoutView from django.http import HttpResponse path('', login_required(dummy)), path('login/', LoginView.as_view()), path('logout/', public(LogoutView.as_view(next_page='/'))), path('mfa/', ...
<vulnerable_code> RequisitionsService.startTiming(); RequisitionsService.saveNode($scope.node).then( function() { // success growl.success('The node ' + $scope.node.nodeLabel + ' has been saved.'); $scope.foreignId = $scope.node.foreignId; form.$dirty = false; },...
<vulnerable_code> RequisitionsService.startTiming(); RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then( function() { // success growl.success('The import operation has been started for ' + requisition.foreignSource + ' (rescanExisting...
<vulnerable_code>'use strict'; const angular = require('angular-js'); require('angular-mocks'); require('../../../../../src/main/assets/js/apps/onms-requisitions/requisitions'); <commit_title>[PATCH] NMS-13231: Backport Security Issues from Last Month<commit_description><fixed_code> 'use strict'; const angular = requ...
<vulnerable_code> UserManager userFactory = UserFactory.getInstance(); String userID = request.getParameter("userID"); String password = request.getParameter("pass1"); boolean hasUser = false;<commit_title>[PATCH] NMS-13231: Backport Security Issues from Last Month<commit_description><f...
<vulnerable_code> String userID = request.getParameter("userID"); String newID = request.getParameter("newID"); // now save to the xml file try { UserManager userFactory = UserFactory.getInstance();<commit_title>[PATCH] NMS-13231: Backport Security Issues from Last Month<comm...
<vulnerable_code> String oldName = request.getParameter("groupName"); String newName = request.getParameter("newName"); if (StringUtils.hasText(oldName) && StringUtils.hasText(newName)) { m_groupRepository.renameGroup(oldName, newName); } groupCom...
<vulnerable_code> @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class NotificationsPageIT extends OpenNMSSeleniumIT { @Before public void setUp() throws Exception { notificationsPage(); findElementByLink("Respond Time"); assertElementDoesNotHaveText(By.xpath("//span[@class='label ...
<vulnerable_code>package org.opennms.smoketest; import static org.junit.Assert.assertEquals; import java.util.List; import org.junit.Before; assertElementDoesNotExist(By.id(USER_NAME)); } }<commit_title>[PATCH] NMS-13231: Backport Security Issues from Last Month<commit_description><fixed_code> package o...
<vulnerable_code>// 12. Internet // ---------------------------------------------------------------------------------- const exec = require('child_process').exec; const execFile = require('child_process').execFile; const util = require('./util'); } let urlSanitized = ''; const s = util.sanitizeShell...
<vulnerable_code> srvString.__proto__.trim = util.stringTrim; const s = util.sanitizeShellString(srv); for (let i = 0; i <= 2000; i++) { if (!(s[i] === undefined)) { srvString = srvString + s[i]; } } } } if ((_darwin) ...
<vulnerable_code>const stringSubstr = new String().substr; const stringTrim = new String().trim; const stringStartWith = new String().startsWith; function isFunction(functionToCheck) { let getType = {}; }); } function getCodepage() { if (_windows) { if (!codepage) { function sanitizeShellString(str, strict ...
<vulnerable_code> } long x_3 = x[3] & M; long zz_5 = zz[5] & M; long zz_6 = zz[6] & M; { zz_3 += x_3 * x_0; w = (int)zz_3; w = (int)zz_6; zz[6] = (w << 1) | c; c = w >>> 31; w = zz[7] + (int)(zz_6 >> 32); zz[7] = (w ...
<vulnerable_code> } long x_3 = x[3] & M; long zz_5 = zz[5] & M; long zz_6 = zz[6] & M; { zz_3 += x_3 * x_0; w = (int)zz_3; } long x_4 = x[4] & M; long zz_7 = zz[7] & M; long zz_8 = zz[8] & M; { zz_4 += x...
<vulnerable_code> } long x_3 = x[3] & M; long zz_5 = zz[5] & M; long zz_6 = zz[6] & M; { zz_3 += x_3 * x_0; w = (int)zz_3; } long x_4 = x[4] & M; long zz_7 = zz[7] & M; long zz_8 = zz[8] & M; { zz_4 += x...
<vulnerable_code> } long x_3 = x[3] & M; long zz_5 = zz[5] & M; long zz_6 = zz[6] & M; { zz_3 += x_3 * x_0; w = (int)zz_3; } long x_4 = x[4] & M; long zz_7 = zz[7] & M; long zz_8 = zz[8] & M; { zz_4 += x...
<vulnerable_code><commit_title>[PATCH] Fix carry propagation bug in Nat???.square methods<commit_description><fixed_code> package org.bouncycastle.math.ec.custom.sec.test; import java.math.BigInteger; import java.security.SecureRandom; import org.bouncycastle.asn1.sec.SECObjectIdentifiers; import org.bouncycastle.asn...
<vulnerable_code><commit_title>[PATCH] Fix carry propagation bug in Nat???.square methods<commit_description><fixed_code> package org.bouncycastle.math.ec.custom.sec.test; import java.math.BigInteger; import java.security.SecureRandom; import org.bouncycastle.asn1.sec.SECObjectIdentifiers; import org.bouncycastle.asn...
<vulnerable_code>#include "file.h" #ifndef lint FILE_RCSID("@(#)$File: cdf.c,v 1.115 2019/08/23 14:29:14 christos Exp $") #endif #include <assert.h> goto out; } nelements = CDF_GETUINT32(q, 1); if (nelements == 0) { DPRINTF(("CDF_VECTOR with nelements == 0\n")); goto out; } slen = 2; g...
<vulnerable_code> _pkt_build_reset_from_pkt(&reset, pkt); gnrc_netapi_send(gnrc_tcp_pid, reset); } return -ENOTCONN; } gnrc_pktbuf_release(pkt);<commit_title>[PATCH] gnrc_tcp: Fix memory leak<commit_description><fixed_code> _pkt_build_reset_from_pkt(&reset, pkt...
<vulnerable_code> var id = this.filtersets_list.get_single_selection(), script = this.env.filtersets[id]; location.href = this.env.comm_path+'&_action=plugin.managesieve-action&_act=setget&_set='+urlencode(script); }; // Set activate/deactivate request<commit_title>[PATCH] Protect download urls against CSRF us...
<vulnerable_code> // default .eml download of single message if (mode == 'eml') { var uid = rcmail.get_single_uid(); rcmail.goto_url('viewsource', rcmail.params_from_uid(uid, {_save: 1})); return; } <commit_title>[PATCH] Protect download urls against CSRF using unique request<commit_d...
<vulnerable_code> break; } this.goto_url('get', qstring+'&_download=1', false); break; case 'select-all': case 'download': if (this.env.action == 'get') { location.href = location.href.replace(/_frame=/, '_download='); } else if (uid = ...
<vulnerable_code>import six from six.moves.urllib.parse import quote from six.moves.urllib.parse import unquote from AccessControl.class_init import InitializeClass from AccessControl.Permissions import view # in an endless redirect loop. return 0 if '?' in url: ...
<vulnerable_code> def test_challenge(self): rc, root, folder, object = self._makeTree() response = FauxCookieResponse() testURL = 'http://test' request = FauxRequest(RESPONSE=response, URL=testURL, ACTUAL_URL=testURL) root.REQUEST = request ...
<vulnerable_code> // Try to get the favicon from the url using an HTTP connection from the pool // that also allows to configure timeout values (e.g. connect and get data) final RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(2000) .setSocketTimeout...
<vulnerable_code> } else if (chunkType == "iCCP") { // The ICC profile name can vary from 1-79 characters. uint32_t iccOffset = 0; while (iccOffset < 80 && iccOffset < chunkLength) { if (chunkData.pData_[iccOffset++] == 0...