text
stringlengths
79
3.72M
<vulnerable_code> var USE_PROFILES = {}; /* Tags to ignore content of when KEEP_CONTENT is true */ var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'script', 'style', 'template', 'thead', 'title', 'svg', 'video']);...
<vulnerable_code>!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.DOMPurify=t()}(this,function(){"use strict";function e(e,t){y&&y(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=r.toLowerCase();o!==r&&(Obje...
<vulnerable_code> 'title', 'svg', 'video', ]); /* Tags that are safe for data: URIs */ continue; } /* Sanitize attribute content to be template-safe */ if (SAFE_FOR_TEMPLATES) { value = value.replace(MUSTACHE_EXPR, ' ');<commit_title>[PATCH] Added better check for attr...
<vulnerable_code> "payload": "<option><iframe></select><b><script>alert(1)</script>", "expected": [ "<option><b></b></option>", "<option>&lt;/select&gt;&lt;b&gt;&lt;script&gt;alert(1)&lt;/script&gt;</option>" ] }, { "title": "Closing Iframe and option", "payload": "<di...
<vulnerable_code> * @param [options] object with options or boolean strict flag * [strict] true to be strict when checking value lengths, false to * allow truncated values (default: true). * [decodeBitStrings] true to attempt to decode the content of * BIT STRINGs (not OCTET ...
<vulnerable_code>_IN('2.16.840.1.101.3.4.2.1', 'sha256'); _IN('2.16.840.1.101.3.4.2.2', 'sha384'); _IN('2.16.840.1.101.3.4.2.3', 'sha512'); _IN('1.2.840.113549.2.5', 'md5'); // pkcs#7 content types<commit_title>[PATCH] Fix signature verification issues.<commit_description>**SECURITY**: Three RSA PKCS#1 v1.5 signature ...
<vulnerable_code> }] }; /** * Wrap digest in DigestInfo object. * * a Forge PSS object for RSASSA-PSS, * 'NONE' or null for none, DigestInfo will not be expected, but * PKCS#1 v1.5 padding will still be used. * * @return true if the signature was verified, false if not. ...
<vulnerable_code>var ASSERT = require('assert'); var FORGE = require('../../lib/forge'); var MD = require('../../lib/md.all'); var MGF = require('../../lib/mgf'); var PKI = require('../../lib/pki'); }); } })(); }); })();<commit_title>[PATCH] Fix signature verification issues.<commit_description>**SE...
<vulnerable_code> assert is_in_or_equal("files/lion.jpg", "files") assert not is_in_or_equal("files", "files/lion.jpg") assert is_in_or_equal("/home/usr/notes.txt", "/home/usr/") assert is_in_or_equal("/home/usr/../usr/notes.txt", "/home/usr/") assert is_in_or_equal("/home/usr/subdirectory", "/home/u...
<vulnerable_code> continue; } if (bin->methods[i].class_id > bin->header.types_size - 1) { continue; } <commit_title>[PATCH] fix #6857<commit_description><fixed_code> continue; } if (bin->methods[i].class_id > bin->header.types_size) { continue; }
<vulnerable_code> function isExternal(url) { let match = url.match( /^([^:/?#]+:)?(?:\/\/([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/ ); if ( typeof match[1] === 'string' &&<commit_title>[PATCH] fix: isExternal check with malformed URL + tests (#1510)<commit_description>Fix #1477. Fix #1126. Follow-up to #1489.<...
<vulnerable_code><commit_title>[PATCH] fix: isExternal check with malformed URL + tests (#1510)<commit_description>Fix #1477. Fix #1126. Follow-up to #1489.<fixed_code> const docsifyInit = require('../helpers/docsify-init'); describe(`Security`, function() { const sharedOptions = { markdown: { homepage: '#...
<vulnerable_code> "Missing number"); return ARCHIVE_WARN; } numbers[argc++] = (unsigned long)mtree_atol(&p); if (argc > MAX_PACK_ARGS) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, "Too many arguments"); return ARCHIVE_WARN; } } if (argc < 2) { archive_set_error(a, ARCH...
<vulnerable_code> #ifdef HAVE_SETGROUPS if (extra_group_size >= 0) { assert(extra_group_size == 0 && extra_groups == NULL || extra_group_size); POSIX_CALL(setgroups(extra_group_size, extra_groups)); } #endif /* HAVE_SETGROUPS */<commit_title>[PATCH] Code Health (remove a compiler warning).<commi...
<vulnerable_code> */ var util = require('util'); var _ = require('@sailshq/lodash'); var semver = require('semver'); var parseSdkMetadata = require('./parse-sdk-metadata'); url : options.incomingSailsIOMsg.url, method : options.eventName, // Attached data becomes simulated HTTP body (`req.bod...
<vulnerable_code> state = reserve_additional_memory(); } if (credit < 0) state = decrease_reservation(-credit, GFP_BALLOON); state = update_schedule(state); } } st = decrease_reservation(nr_pages, GFP_USER); if (st != BP_DONE) return -ENOMEM; balloon_stats.schedule_delay = 1; balloon_stats.max_...
<vulnerable_code> module.exports = { directive: 'EPRT', handler: function ({command} = {}) { const [, protocol, ip, port] = _.chain(command).get('arg', '').split('|').value(); const family = FAMILY[protocol]; if (!family) return this.reply(504, 'Unknown network protocol'); this.connector = new Acti...
<vulnerable_code> module.exports = { directive: 'EPSV', handler: function () { this.connector = new PassiveConnector(this); return this.connector.setupServer() .then((server) => { const {port} = server.address(); return this.reply(229, `EPSV OK (|||${port}|)`); }); }, syntax: '{{cmd...
<vulnerable_code> }) .catch((err) => { log.error(err); return this.reply(425); }); }, syntax: '{{cmd}}',<commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that the server connects to from the PORT command is the same IP as the cur...
<vulnerable_code> .then(() => this.reply(200)) .catch((err) => { log.error(err); return this.reply(425); }); }, syntax: '{{cmd}} <x>,<x>,<x>,<x>,<y>,<y>',<commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that the server connects ...
<vulnerable_code>const {Socket} = require('net'); const tls = require('tls'); const Promise = require('bluebird'); const Connector = require('./base'); class Active extends Connector { constructor(connection) { return closeExistingServer() .then(() => { this.dataSocket = new Socket(); this.dataS...
<vulnerable_code> closeSocket() { if (this.dataSocket) { const socket = this.dataSocket; this.dataSocket.end(() => socket.destroy()); this.dataSocket = null; } }<commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that the server ...
<vulnerable_code> }); it('// unsuccessful | no argument', () => { return cmdFn() .then(() => { expect(mockClient.reply.args[0][0]).to.equal(504); });<commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that the server connects to from th...
<vulnerable_code> }); it('// successful IPv4', () => { return cmdFn() .then(() => { const [code, message] = mockClient.reply.args[0]; expect(code).to.equal(229);<commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that the server conne...
<vulnerable_code> it('BAD // unsuccessful', () => { return cmdFn({command: {arg: 'BAD', directive: CMD}}) .then(() => { expect(mockClient.reply.args[0][0]).to.equal(500); }); }); <commit_title>[PATCH] fix: disallow PORT connections to alternate hosts<commit_description>Ensure the data socket that t...
<vulnerable_code> let getNextPort = getNextPortFactory(host, 1024); let PORT; let active; let mockConnection = {}; let sandbox; let server; before(() => { active = new ActiveConnector(mockConnection); }); beforeEach((done) => { sandbox = sinon.sandbox.create().usingPromise(Promise); getNe...
<vulnerable_code> const struct l2tp_attr_t *attr; const struct l2tp_dict_value_t *val; if (pack->hdr.ver == 2) { print("[L2TP tid=%u sid=%u", ntohs(pack->hdr.tid), ntohs(pack->hdr.sid)); log_ppp_debug(" Ns=%u Nr=%u", ntohs(pack->hdr.Ns), ntohs(pack->hdr.Nr)); } else { print("[L2TP cid=%u", pack->hdr.cid); l...
<vulnerable_code> pic_path = req.files.fileUpload.path; }else{ var file = fs.createWriteStream('public/images/fuck_you_node.png'); req.on('data', function(data){ console.log("got data"+data); file.write(data); }).on('end', function(){ file.end(); console.log("We did it!"); }...
<vulnerable_code> while (TRUE) { int conn; FILE *fp; char linebuf[1024], *line; char keybuf[1024], *key; * daemon process from restarting */ for (i = 0; i < socket_count; ++i) close(sockets[i]); ...
<vulnerable_code> try { sheet.values['A1']; } catch (error) { console.log(error); test.strictSame(error.constructor.name === 'TypeError', true); } try { sheet.values['A1']; } catch (error) { console.log(error); test.strictSame(error.constructor.name === 'TypeError', true); } try {...
<vulnerable_code>import cStringIO from base import BaseController class IpkgController(BaseController): request.setHeader('charset', 'UTF-8') content = request.args['rfile'][0] filename = self.mbasename(request.args['filename'][0]) if not content: result = [False,_('Error upload File')] else: if not...
<vulnerable_code>config.OpenWebif.no_root_access = ConfigYesNo(default=False) config.OpenWebif.local_access_only = ConfigSelection(default=' ', choices=[' ']) config.OpenWebif.vpn_access = ConfigYesNo(default=False) # encoding of EPG data config.OpenWebif.epg_encoding = ConfigSelection(default = 'utf-8', choices = [ 'u...
<vulnerable_code>static krb5_error_code get_tag(const uint8_t *asn1, size_t len, taginfo *tag_out, const uint8_t **contents_out, size_t *clen_out, const uint8_t **remainder_out, size_t *rlen_out) { krb5_error_code ret; uint8_t o; /* Indefinite form (should not be present in DER, but we a...
<vulnerable_code> GF_BitStream *bs; GF_Err e; CommandBufferItem *cbi; u32 NbPass = gf_list_count(codec->command_buffers); GF_List *nextPass = gf_list_new(); while (NbPass) { codec->LastError = GF_OK; } gf_list_del(nextPass); return GF_OK; } <commit_title>[PATCH] fixed #2033<commit_description><fixed_code> GF...
<vulnerable_code> buf[idx] = ch; return 1; } return 0; } // the header is within the next VW hdr = j + 1; if (len >= 1) { len--; } } else { // if short address hdr = mw1; mw1++; if (!flex_groupmessage && len >= 1) { len--; } ...
<vulnerable_code> return value; } /** * \brief Performs data packet pointer boundary check return -1; } else { option_number += option_ext; *message_left = sn_coap_parser_move_packet_ptr(packet_data_pptr, ...
<vulnerable_code>PAM_AUTHENTICATE.restype = c_int PAM_AUTHENTICATE.argtypes = [PamHandle, c_int] def authenticate(api_handle, username: str, password: str) -> bool: """ return False retval = PAM_AUTHENTICATE(handle, 0) return retval == 0<commit_title>[PATCH] Security: Fix CVE-2022-0860<commit_des...
<vulnerable_code>""" # SPDX-License-Identifier: GPL-2.0-or-later import base64 import os import xmlrpc.client import pytest from cobbler.utils import get_shared_secret # ==================== Start tnpconsultants ==================== assert result is False # ==================== END tnpconsultants =============...
<vulnerable_code> } } xmlReader.parse(inputSource); } catch (SAXParseException e) {<commit_title>[PATCH 1/5] GH-1158 fix for XXE vulnerability in RdfXmlParser<commit_description>Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com><fixed_code> } } // Via https://www.owasp.org/index.php/XML_E...
<vulnerable_code> public void rdfXmlLoadedFromInsideAJarResolvesRelativeUris() throws Exception { URL zipfileUrl = this.getClass().getResource( "/org/eclipse/rdf4j/rio/rdfxml/sample-with-rdfxml-data.zip"); assertNotNull("The sample-data.zip file must be present for this test", zipfileUrl); assertEquals(v...
<vulnerable_code> Locale.setDefault(platformLocale); } @Test public void testFatalErrorPrologContent() throws Exception<commit_title>[PATCH 1/5] GH-1158 fix for XXE vulnerability in RdfXmlParser<commit_description>Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com><fixed_code> Locale.setDefault(platformLo...
<vulnerable_code>import org.xml.sax.helpers.DefaultHandler; /** * An XML parser that generates "simple" SAX-like events from a limited subset of XML documents. The * SimpleSAXParser can parse simple XML documents; it doesn't support processing instructions or elements that * contain both sub-element and character d...
<vulnerable_code> * @author Michael Grove * @author Peter Ansell * @see XMLConstants * @see <a href="http://xerces.apache.org/xerces-j/features.html">Apache XML Project - Features</a> */ public final class XMLParserSettings { public static final RioSetting<Boolean> SECURE_PROCESSING = new RioSettingImpl<Boolean>(...
<vulnerable_code><commit_title>[PATCH 1/5] GH-1158 fix for XXE vulnerability in RdfXmlParser<commit_description>Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com><fixed_code> package org.eclipse.rdf4j.rio.helpers; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.ut...
<vulnerable_code>import org.eclipse.rdf4j.rio.RioSetting; import org.eclipse.rdf4j.rio.helpers.AbstractRDFParser; import org.eclipse.rdf4j.rio.helpers.XMLParserSettings; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.Locator; * @see org.eclipse.rdf4j.rio.ParseLocationListener * @a...
<vulnerable_code>import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.PrintStream; import java.net.URL; import org.eclipse.rdf4j.model.Statement; import org....
<vulnerable_code>import java.io.InputStream; import java.io.Reader; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.commons.io.input.BOMInputStream; import org.eclipse.rdf4j.common.xml.SimpleSAXAdapter; import org.eclipse.rdf4j.rio.RDFParseException; import org.eclipse.rdf4j....
<vulnerable_code> */ public synchronized void parse(InputSource inputSource) throws SAXException, IOException { xmlReader.setContentHandler(new SimpleSAXDefaultHandler()); // Via https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet xmlReader.setFeature("http://apache.org/xml/...
<vulnerable_code> public void testSupportedSettings() throws Exception { assertEquals(22, Rio.createParser(RDFFormat.RDFXML).getSupportedSettings().size()); } }<commit_title>[PATCH 1/5] GH-1158 fix for XXE vulnerability in RdfXmlParser<commit_description>Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com><fi...
<vulnerable_code> public Collection<RioSetting<Boolean>> getCompulsoryXmlFeatureSettings() { Set<RioSetting<Boolean>> results = new HashSet<RioSetting<Boolean>>(); results.add(XMLParserSettings.SECURE_PROCESSING); return results; } <commit_title>[PATCH 1/5] GH-1158 fix for XXE vulnerability in RdfXmlParser<commi...
<vulnerable_code> results.add(XMLParserSettings.DISALLOW_DOCTYPE_DECL); results.add(XMLParserSettings.EXTERNAL_GENERAL_ENTITIES); results.add(XMLParserSettings.EXTERNAL_PARAMETER_ENTITIES); results.add(XMLParserSettings.LOAD_EXTERNAL_DTD); return results; } * {@link XMLReader#setFeature(String, boo...
<vulnerable_code> XMLConstants.FEATURE_SECURE_PROCESSING, "Secure processing feature of XMLConstants", true); /** * Parser setting specifying whether DOCTYPE declaration should be allowed. * <p> * Defaults to false. * * @see <a href="http://xerces.apache.org/xerces2-j/features.html">Apache XML Project - ...
<vulnerable_code> namespace et { el::Configurations LogHandler::setupLogHandler(int *argc, char ***argv) { // easylogging parse verbose arguments, see [Application Arguments] // in https://github.com/muflihun/easyloggingpp/blob/master/README.md START_EASYLOGGINGPP(*argc, *argv); // Easylogging configurations ...
<vulnerable_code> const browseNextRequest = new BrowseNextRequest({ continuationPoints: null }); g_session.performMessageTransaction(browseNextRequest, function(err, response) { err.message.should.match(/BadNothin...
<vulnerable_code> Variant, Subscription, SubscriptionState, installSessionLogging } = require("node-opcua"); const { make_debugLog, checkDebugFlag } = require("node-opcua-debug"); const { }, function (callback) { ...
<vulnerable_code> const response1 = spy_publish_session2.getCall(1).args[1]; const response2 = spy_publish_session2.getCall(2).args[1]; const response3 = spy_publish_session2.getCall(3).args[1]; response1.responseHeader.serv...
<vulnerable_code>const describe = require("node-opcua-leak-detector").describeWithLeakDetector; module.exports = function (test) { describe("Browse-Read-Write Services", function () { let g_session = null; // use fail fast connectionStrategy g_session.read(nodesToRead, function (err, d...
<vulnerable_code>const should = require("should"); const async = require("async"); const { perform_operation_on_client_session } = require("../../test_helpers/perform_operation_on_client_session"); const opcua = require("node-opcua"); const StatusCodes = opcua.StatusCodes; const OPCUAClient = opcua.OPCUAClient; const...
<vulnerable_code> let session1; let last_response; let activate_error; async.series([ console.log(err ? err.toString() : "null"); console.log(response ? response.toString() : "null"); last_response =...
<vulnerable_code>"use strict"; const should = require("should"); const async = require("async"); const _ = require("underscore"); const path = require("path"); const fs = require("fs"); const { OPCUAClient, StatusCodes, PublishRequest, CreateSubscriptionRequest, CloseSessionRequest, ReadRequest, Times...
<vulnerable_code>const { StatusCodes, StatusCode } = require("node-opcua-status-code"); const { TimestampsToReturn } = require("node-opcua-service-read"); const { MonitoredItemCreateRequest } = require("node-opcua-service-subscription"); const { get_mini_nodeset_filename } = require("node-opcua-address-space/testHelpe...
<vulnerable_code> if (key.name === "l") { dumpRunningTests(); } }); } const infoTimer = setInterval(() => { console.log("----------------------------------------------- RUNNING TESTS "); dumpRunningTests(); ...
<vulnerable_code>package uk.gov.hmcts.ccd.data.casedetails.search; import java.util.Optional; import org.junit.Test; import org.junit.Assert; public class SortDirectionTest { @Test public void test_from_null_string() { Assert.assertEquals(SortDirection.ASC, SortDirection.fromOptionalString(Optional.em...
<vulnerable_code> if (!(box = jas_malloc(sizeof(jp2_box_t)))) { goto error; } box->ops = &jp2_boxinfo_unk.ops; if (jp2_getuint32(in, &len) || jp2_getuint32(in, &box->type)) { goto error; } boxinfo = jp2_boxinfolookup(box->type); box->info = boxinfo; box->ops = &boxinfo->ops; box->len = len; JAS_DBGLOG(10, ...
<vulnerable_code> if self.will_close: self.handle_close() def _flush_exception(self, flush): if flush: try: return (flush(), False) except OSError: if self.adj.log_socket_errors: self.logger.exception("Socket err...
<vulnerable_code> else: return conn, addr def send(self, data): try: result = self.socket.send(data) return result if why.args[0] == EWOULDBLOCK: return 0 elif why.args[0] in _DISCONNECTED: self.handle_close(...
<vulnerable_code> inst.total_outbufs_len = len(inst.outbufs[0]) inst.adj.send_bytes = 1 inst.adj.outbuf_high_watermark = 2 sock.send = lambda x: False inst.will_close = False inst.last_activity = 0 result = inst.handle_write() buf = DummyHugeOutbuffer() ...
<vulnerable_code> ( 17 - 126 * mul + 273 * mul2 - 164 * mul3) / 12096, }; double mat_freq[13]; memcpy(mat_freq, kernel, sizeof(kernel)); memset(mat_freq + 4, 0, sizeof(mat_freq) - sizeof(kernel)); int n = 6;<commit_title>[PATCH] Fix blur coefficient calculation buffer overflow<commit_des...
<vulnerable_code> global MyLoader, MyDumper, MyTestClass1, MyTestClass2, MyTestClass3, YAMLObject1, YAMLObject2, \ AnObject, AnInstance, AState, ACustomState, InitArgs, InitArgsWithState, \ NewArgs, NewArgsWithState, Reduce, ReduceWithState, Slots, MyInt, MyList, MyDict, \ Fi...
<vulnerable_code> unsigned tile=0, r, c, row, col; if (!filters) { pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "leaf_hdr_load_raw()"); } 654,665,676,687,698,710,721,732,743,754,766,777,788,799,810,822,833,844, 855,866,878,889,900,911,922,933,945,956,967,978,989,1001,1012,1...
<vulnerable_code> return; } cbc_ext_opcode_t context_opcode = CBC_EXT_OBJ_INIT_CONTEXT_CREATE; if (flags & PARSER_PATTERN_HAS_REST_ELEMENT) parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED); } /* Checked at the end because there might be syntax errors before. */ JERRY...
<vulnerable_code><commit_title>[PATCH] XWIKI-21110: Improve section name display in administration<commit_description><fixed_code> /* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * un...
<vulnerable_code> } i = (int32_t)li; if (i-- == 0) { fprintf(outfile, "** Zero repeat not allowed\n"); return PR_OK; } <commit_title>[PATCH] Diagnose negative repeat value in pcre2test subject line<commit_description><fixed_code> } i = (int32_t)li; if (i-- <= 0) ...
<vulnerable_code> } } } } <commit_title>[PATCH] Issue #9554 - add javadoc for illegal vchar methods and move<commit_description><fixed_code> } } } /** * This is used when decoding to not decode illegal characters based on RFC9110. * CR, LF, or NUL are replac...
<vulnerable_code> } } } public static boolean isIllegalCharacter(char c) { return (c >= 256 || c < ' '); } public static char getReplacementCharacter(char c) { switch (c) { // A recipient of CR, LF, or NUL within a field value MUST either ...
<vulnerable_code> import java.nio.ByteBuffer; import org.eclipse.jetty.util.CharsetStringBuilder; import static org.eclipse.jetty.http.compression.Huffman.rowbits; // terminal node int i = 0xFF & rowsym[_node]; i = Huffman.getReplacementCharacter(i); ...
<vulnerable_code> import java.nio.ByteBuffer; import static org.eclipse.jetty.http.compression.Huffman.CODES; import static org.eclipse.jetty.http.compression.Huffman.LCCODES; for (int i = 0; i < len; i++) { char c = s.charAt(i); if (Huffman.isIllegalCharacter(c)) ...
<vulnerable_code>import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http.PreEncodedHttpField; import org.eclipse.jetty.http.compression.H...
<vulnerable_code>} template <typename T> void decompressDataForType(const char * source, UInt32 source_size, char * dest) { const char * const source_end = source + source_size; if (source + sizeof(UInt32) > source_end) return; if (source + sizeof(T) > source_end || items_count < 1) return...
<vulnerable_code> args->shader_rec_count); struct vc4_bo *bo; if (uniforms_offset < shader_rec_offset || exec_size < uniforms_offset || args->shader_rec_count >= (UINT_MAX / sizeof(struct vc4_shader_state)) ||<commit_title>[PATCH] drm/vc4: Fix an integer overflow in temporary allocation<commit...
<vulnerable_code> server->session_key.response = NULL; server->session_key.len = 0; kfree(server->hostname); task = xchg(&server->tsk, NULL); if (task)<commit_title>[PATCH] cifs: fix use-after-free caused by invalid pointer `hostname`<commit_description>`hostname` needs to be set as null-pointer after free in `cif...
<vulnerable_code> allow_list = [ url_for('browser.index') ] url = get_post_login_redirect() if url in allow_list: return url return "/"<commit_title>[PATCH] Allow script name URLs in the next URL of the login page.<commit_description>refs #5343<fixed_code> allow_list = [ ...
<vulnerable_code> goto out; } out: if (allocated && ecpoint != NULL) free(ecpoint); goto out; } out: if (point != NULL) EC_POINT_free(point);<commit_title>[PATCH] SOFT: Check the EC Key on C_CreateObject and C_DeriveKey<commit_description>When constructing an OpenSSL EC ...
<vulnerable_code>jQuery(document).ready(function($) { $('div#jobs-admin-sort').each(function() { var sortList = $('ul#custom-type-list'); sortList.sortable({ update: function(event, ui) { $('#loading-animation').show(); // Show the animate loading gif while waiting opts = { url: ajaxurl, // ajax...
<vulnerable_code>import org.jivesoftware.smack.SmackException.NoResponseException; import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.SmackException.ResourceBindingNotOfferedException; import org.jivesoftware.smack.SmackException.SecurityRequiredException; import org.jives...
<vulnerable_code>import org.jivesoftware.smack.SmackException.NoResponseException; import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.SmackException.ConnectionException; import org.jivesoftware.smack.SmackException.SecurityRequiredByClientException; import org.jivesoftware...
<vulnerable_code> E3016( "Data sharing is not enabled for this object" ), E3017( "Invalid user group access string: `{0}`" ), E3018( "Invalid user access string: `{0}`" ), /* Metadata Validation */ E4000( "Missing required property `{0}`." ),<commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_descript...
<vulnerable_code> .getUserAuthorityGroups().stream().map( BaseIdentifiableObject::getUid ).collect( Collectors.toList() ) ); roles.forEach( ur -> { if ( !currentUser.getUserCredentials().canIssueUserRole( ur, canGrantOwnUserAuthorityGroups ) ) { errors.add( ne...
<vulnerable_code> return new String( randomChars ); } /** * Generates a cryptographically strong random token encoded in Base64 *<commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> return new String( randomChars ); } /** * Generates a random token e...
<vulnerable_code> void copyContent( String key, OutputStream output ) throws IOException, NoSuchElementException; }<commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> void copyContent( String key, OutputStream output ) throws IOException, NoSuchElementExcept...
<vulnerable_code> throws IOException, NoSuchElementException; boolean fileResourceExists( String uid ); void updateFileResource( FileResource fileResource );<commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> throws IOException, NoSuchElementException; ...
<vulnerable_code><commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> /* * Copyright (c) 2004-2022, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: *...
<vulnerable_code> fileResourceContentStore.copyContent( fileResource.getStorageKey(), outputStream ); } @Override @Transactional public boolean fileResourceExists( String uid )<commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> fileResourceContentStore.copyContent(...
<vulnerable_code> throw new NoSuchElementException( "key '" + key + "' not found." ); } Blob blob = getBlob( key ); try ( InputStream in = blob.getPayload().openStream() ) { IOUtils.copy( in, output ); } } // -------------------------------------...
<vulnerable_code>import java.util.Arrays; import java.util.Optional; /** * @author Lars Helge Overland */ ENABLE_OAUTH2_AUTHORIZATION_SERVER( "oauth2.authorization.server.enabled", Constants.ON, false ), ENABLE_JWT_OIDC_TOKEN_AUTHENTICATION( "oidc.jwt.token.authentication.enabled", Constants.OFF, false ); ...
<vulnerable_code><commit_title>[PATCH 1/7] fix: DHIS2-11799<commit_description><fixed_code> /* * Copyright (c) 2004-2021, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: *...
<vulnerable_code>import org.hisp.dhis.dxf2.webmessage.WebMessageException; import org.hisp.dhis.dxf2.webmessage.WebMessageUtils; import org.hisp.dhis.dxf2.webmessage.responses.FileResourceWebMessageResponse; import org.hisp.dhis.fieldfilter.FieldFilterParams; import org.hisp.dhis.fieldfilter.FieldFilterService; import ...
<vulnerable_code>import org.hisp.dhis.document.Document; import org.hisp.dhis.document.DocumentService; import org.hisp.dhis.dxf2.webmessage.WebMessageException; import org.hisp.dhis.dxf2.webmessage.WebMessageUtils; import org.hisp.dhis.external.location.LocationManager; import org.hisp.dhis.fileresource.FileResource; ...
<vulnerable_code>import org.hisp.dhis.common.DhisApiVersion; import org.hisp.dhis.dxf2.webmessage.WebMessageException; import org.hisp.dhis.dxf2.webmessage.WebMessageUtils; import org.hisp.dhis.feedback.Status; import org.hisp.dhis.fileresource.ExternalFileResource; import org.hisp.dhis.fileresource.ExternalFileResourc...
<vulnerable_code>import org.hisp.dhis.dxf2.webmessage.WebMessageException; import org.hisp.dhis.dxf2.webmessage.WebMessageUtils; import org.hisp.dhis.dxf2.webmessage.responses.FileResourceWebMessageResponse; import org.hisp.dhis.feedback.Status; import org.hisp.dhis.fileresource.FileResource; import org.hisp.dhis.filer...