text
stringlengths
79
3.72M
<vulnerable_code>import com.iplanet.am.util.SystemProperties; import com.sun.identity.authentication.service.AuthD; import org.forgerock.guice.core.InjectorHolder; import org.mockito.Mockito; import org.opends.quicksetup.installer.AuthenticationData; import org.powermock.core.classloader.annotations.PowerMockIgnore; im...
<vulnerable_code> this.url_delete = ''; this.onDocumentReady = function(){ $('.custom-file-input').on('change',function(){ $(this).next('.custom-file-label').text($(this).val().replace('C:\\fakepath\\', '')); }); }; this.remove = function(file_id){ $('#f_'+file_id+...
<vulnerable_code>/*! jQuery v3.7.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t...
<vulnerable_code>!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:O.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=c(t)),v)}function i(e,t,n){return f({type:O.info,iconClass:g(...
<vulnerable_code>/* Redactor v9.2.6 Updated: Jul 19, 2014 http://imperavi.com/redactor/ Copyright (c) 2009-2014, Imperavi LLC. License: http://imperavi.com/redactor/license/ if ($.inArray('p', this.opts.allowedTags) === '-1') this.opts.allowedTags.push('p'); for (i in arrSearch) { if ($.inAr...
<vulnerable_code>!function($){var uuid=0;"use strict";var Range=function(t){return this[0]=t.startOffset,this[1]=t.endOffset,this.range=t,this};Range.prototype.equals=function(){return this[0]===this[1]};var reUrlYoutube=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?...
<vulnerable_code> int conflen = 0; int signalg; int sealalg; gss_buffer_desc token; krb5_checksum cksum; krb5_checksum md5cksum; krb5_ui_4 seqnum; OM_uint32 retval; size_t sumlen; krb5_keyusage sign_usage = KG_USAGE_SIGN; if (toktype == KG_TOK_SEAL_MSG) { message_buff...
<vulnerable_code> return GSS_S_DEFECTIVE_TOKEN; } if (header->buffer.length < token_wrapper_len + 14) { *minor_status = 0; return GSS_S_DEFECTIVE_TOKEN; }<commit_title>[PATCH] Handle invalid RFC 1964 tokens [CVE-2014-4341...]<commit_description>Detect the following cases which would ...
<vulnerable_code> static create(data) { const node = super.create(); const denotationChar = document.createElement("span"); denotationChar.className = "ql-mention-denotation-char"; denotationChar.innerHTML = data.denotationChar; node.appendChild(denotationChar); node.innerHTML += data.value; ...
<vulnerable_code> attachDataValues, getMentionCharIndex, hasValidChars, hasValidMentionCharIndex } from "./utils"; import "./quill.mention.css"; import "./blots/mention"; this.options = { source: null, renderItem(item) { return `${item.value}`; }, renderLoading() { re...
<vulnerable_code> return mention; } function getMentionCharIndex(text, mentionDenotationChars, isolateChar, allowInlineMentionChar) { return mentionDenotationChars.reduce( (prev, mentionChar) => { attachDataValues, getMentionCharIndex, hasValidChars, hasValidMentionCharIndex };<commit_title>[PATCH] supp...
<vulnerable_code> to_port=to_port, msg="For ICMP, the" " type:code must be valid") values['protocol'] = ip_protocol values['from_port'] = from_port values['to_port'] = to_port else:<commit_title>[PATCH] Fix up p...
<vulnerable_code> else: fw_rules = ipv6_rules protocol = rule.protocol if version == 6 and rule.protocol == 'icmp': protocol = 'icmpv6' args = ['-j ACCEPT']<commit_title>[PATCH] Fix up protocol case handling for sec...
<vulnerable_code>here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): return codecs.open(os.path.join(here, *parts), 'r', 'utf8').read() def find_version(*file_paths): version_file = read(*file_paths)<commit_title>[PATCH] setup.py read function fix<commit_description><fixed_code> here = os.path...
<vulnerable_code> case HTML_DD: CLOSE_A; CLOSE_DT; if (envs[h_env->envc].env == HTML_DL_COMPACT) { if (obuf->pos > envs[h_env->envc].indent) flushline(h_env, obuf, envs[h_env->envc].indent, 0,<commit_title>[PATCH] Fix uninitialised values for <i> and <dd><commit_description>Bug-Debian: https://github.com/t...
<vulnerable_code> int i, attr_id = 0, nattr; /* Parse tag name */ q = (*s) + 1; p = tagname; if (*q == '/') {<commit_title>[PATCH] Fix uninitialised values for <i> and <dd><commit_description>Bug-Debian: https://github.com/tats/w3m/issues/16 [CVE-2016-9435] [CVE-2016-9436] Origin: https://anonscm.de...
<vulnerable_code><commit_title>[PATCH] Created new Filter to intercept and normalizate URIs (#17809)<commit_description>* Created new Filter to intercept and normalizate URIs * Applied feedback #17796 (cherry picked from commit c498997035154d7e110781f41a519ea45baa59ac)<fixed_code> package com.dotcms.filters; import ...
<vulnerable_code><commit_title>[PATCH] Created new Filter to intercept and normalizate URIs (#17809)<commit_description>* Created new Filter to intercept and normalizate URIs * Applied feedback #17796 (cherry picked from commit c498997035154d7e110781f41a519ea45baa59ac)<fixed_code> package com.dotcms.filters; import ...
<vulnerable_code> ipv6 = NULL; assert(data); if (!data || payload_len <= 0 || payload_len > 65535) { tcpedit_setwarn(tcpedit, "%s", "Unable to checksum packets with no L3+ data"); return TCPEDIT_WARN; } ipv4 = (ipv4_hdr_t *)data; if (ipv4->ip_v == 6) { ipv6 = (ipv6_hdr_t...
<vulnerable_code>from __future__ import division, absolute_import, print_function import sys from tempfile import NamedTemporaryFile, TemporaryFile, mktemp import os from numpy import memmap assert_array_equal(self.data, newfp) def test_open_with_filename(self): tmpname = mktemp('', 'mmap') ...
<vulnerable_code> self.x = rand(shape) + rand(shape).astype(np.complex)*1j self.x[0,:, 1] = [nan, inf, -inf, nan] self.dtype = self.x.dtype self.filename = tempfile.mktemp() def tearDown(self): if os.path.isfile(self.filename): os.unlink(self.filename) ...
<vulnerable_code> from numpy.distutils.exec_command import exec_command import tempfile if source_fn is None: fname = os.path.join(tempfile.mktemp()+'.f') else: fname = source_fn f = open(fname, 'w') f.write(source) f.close() args = ' -c -m %s %s %s'%(modulename, fname, ...
<vulnerable_code> --lower is assumed with -h key, and --no-lower without -h key. --build-dir <dirname> All f2py generated files are created in <dirname>. Default is tempfile.mktemp(). --overwrite-signature Overwrite existing signature file. del sys.argv[i] else:...
<vulnerable_code>import gzip import os import threading from tempfile import mkstemp, mktemp, NamedTemporaryFile import time import warnings import gc assert_raises, run_module_suite) from numpy.testing import assert_warns, assert_, build_err_msg class TextIO(BytesIO): """Helper IO...
<vulnerable_code>import java.io.IOException; import java.util.Arrays; import org.junit.Assert; import org.junit.Test; verifyException(e, "Premature end of file"); } } protected void verifyException(Throwable e, String... matches) {<commit_title>[PATCH] Update FuzzTomlReadTest....
<vulnerable_code> data }) }<commit_title>[PATCH 01/15] fix:#957<commit_description><fixed_code> data }) } export const createPackageApi = (data) => { return service({ url: '/autoCode/createPackage', method: 'post', data }) } export const getPackageApi = () => { return service({ url: '...
<vulnerable_code> }] const asyncRouterRes = await asyncMenu() const asyncRouter = asyncRouterRes.data.menus asyncRouter.push({ path: '404', name: '404', hidden: true,<commit_title>[PATCH 01/15] fix:#957<commit_description><fixed_code> }] const asyncRouterRes = await asyncMenu() ...
<vulnerable_code>import { useRoute } from 'vue-router' import {reactive }from 'vue' export const useBtnAuth = () => { const route = useRoute() return route.meta.btns || reactive({}) }<commit_title>[PATCH 01/15] fix:#957<commit_description><fixed_code> import { useRoute } from 'vue-router' import { reactive } from ...
<vulnerable_code> ) console.log( chalk.green( `> 当前版本:V2.5.0` ) ) console.log(<commit_title>[PATCH 01/15] fix:#957<commit_description><fixed_code> ) console.log( chalk.green( `> 当前版本:v2.5.1 beta` ) ) console.log(
<vulnerable_code> register(app) console.log(` 欢迎使用 Gin-Vue-Admin 当前版本:V2.5.0 加群方式:微信:shouzi_1994 QQ群:622360840 GVA讨论社区:https://support.qq.com/products/371961 默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html<commit_title>[PATCH 01/15] fix:#957<co...
<vulnerable_code>import { login, getUserInfo, setSelfInfo } from '@/api/user' import { jsonInBlacklist } from '@/api/jwt' import router from '@/router/index' import { ElMessage } from 'element-plus' import { defineStore } from 'pinia' import { ref, computed, watch } from 'vue' import { useRouterStore } from './router' ...
<vulnerable_code>#define ASYNC_CONTEXT_DEFAULT_STACK_SIZE (4096*15) #define MA_RPL_VERSION_HACK "5.5.5-" #undef max_allowed_packet #undef net_buffer_length extern ulong max_allowed_packet; /* net.c */ int ma_read_ok_packet(MYSQL *mysql, uchar *pos, ulong length) { size_t item_len; mysql->affected_rows= net_field_...
<vulnerable_code> else: # construct request node0 = self._setrootelement('csw:GetRecords') if etree.__name__ != 'lxml.etree': # apply nsmap manually node0.set('xmlns:ows', namespaces['ows']) node0.set('xmlns:gmd', namespaces['gmd']) ...
<vulnerable_code> else: # construct request node0 = self._setrootelement('csw30:GetRecords') if etree.__name__ != 'lxml.etree': # apply nsmap manually node0.set('xmlns:ows110', namespaces['ows110']) node0.set('xmlns:gmd', namespaces['gmd']) ...
<vulnerable_code># Contact email: sgillies@frii.com # ============================================================================= from owslib.namespaces import Namespaces def patch_well_known_namespaces(etree_module): """Monkey patches the etree module to add some well-known namespaces.""" ns = Namespaces...
<vulnerable_code>from urllib.parse import urlencode, parse_qsl from owslib.etree import etree from owslib.namespaces import Namespaces from owslib.util import which_etree, findall, Authentication, openURL MYNS = Namespaces() XS_NAMESPACE = MYNS.get_namespace("xs")<commit_title>[PATCH] use only lxml for XML handling<co...
<vulnerable_code> def cleanup_namespaces(element): """ Remove unused namespaces from an element """ if etree.__name__ == 'lxml.etree': etree.cleanup_namespaces(element) return element else: return etree.fromstring(etree.tostring(element)) def add_namespaces(root, ns_keys): ns_...
<vulnerable_code> for ( ;; ) { if (start == prev) { break; } <commit_title>[PATCH] Fixed String.prototype.trimEnd() with unicode string.<commit_description>Previously, when the method was invoked with a string consisting of space characters and at least on...
<vulnerable_code> { njs_str("' абв '.trimStart().trimEnd()"), njs_str("абв") }, { njs_str("'\\u2029abc\\uFEFF\\u2028'.trim()"), njs_str("abc") }, <commit_title>[PATCH] Fixed String.prototype.trimEnd() with unicode string.<commit_description>Previously, when the method was invoked with a string co...
<vulnerable_code> */ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) { console_verbose(); pr_crit("Bad mode in %s handler detected, code 0x%08x\n", handler[reason], esr); die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); } void __pte_error(const char *file, ...
<vulnerable_code> g_string_append_printf (new_exec, " @@ %s @@", arg); else if (strcasecmp (arg, "%u") == 0) g_string_append_printf (new_exec, " @@u %s @@", arg); else g_string_append_printf (new_exec, " %s", arg); }<commit_title>[PA...
<vulnerable_code> size2 = avio_rb32(pb); ret = ff_rm_read_mdpr_codecdata(s, s->pb, st2, st2->priv_data, size2, mime); if (ret < 0) return ret; }<commit_title>[PATCH] avformat/rmdec: Do not pass mime type in rm_read_multi() to<commit_descrip...
<vulnerable_code>/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). SCREWUP("size out of range"); size = (off_t)ull; if ((strchr(cp, '/') != NULL) || (strcmp(cp, ".....
<vulnerable_code> if (copy) { // If we run out of memory some or all of the lines are empty. if (reg->y_size == 0) reg->y_array = NULL; else reg->y_array = ALLOC_MULT(char_u *, reg->y_size);<commit_title>[PATCH] patch 9.0.1531: crash when register contents ends up being<commit_description><fixed_cod...
<vulnerable_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 1530, /**/<commit_title>[PATCH] patch 9.0.1531: crash when register contents ends up being<commit_description><fixed_code> static int included_patches[] = { /* Add new patch number below this line */ /**/ 15...
<vulnerable_code> issue_el.addClass("error"); issue_el.focus() } var message = field_required_lang.replace("_XXX_", issue_el.attr("title")) showAlertFromMessage(message, false) } return false;<commit_title>[PATCH] Potential XSS fix<commi...
<vulnerable_code> } zend_end_try(); } } /* re-read the object from the object store as the store might have been reallocated in the dtor */ obj = &EG(objects_store).object_buckets[handle].bucket.obj; { zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); zend_object_store_bucket *obj_bucket = &E...
<vulnerable_code> /* We've got partially constructed object on our hands here. Wipe it. */ if(Z_TYPE_PP(rval) == IS_OBJECT) { zend_hash_clean(Z_OBJPROP_PP(rval)); } ZVAL_NULL(*rval); return 0; #line 495 "ext/standard/var_unserializer.c" { YYCTYPE yych; static const unsigned char yybm[]...
<vulnerable_code> int top_plines = plines_win_nofill(curwin, curwin->w_topline, false); int skip_lines = 0; int width1 = curwin->w_width_inner - curwin_col_off(); int width2 = width1 + curwin_col_off2(); // similar formula is used in curs_columns() if (curwin->w_skipcol > width1) { ...
<vulnerable_code> packet->accept_line.len = 0, packet->user_agent_line.ptr = NULL, packet->user_agent_line.len = 0, packet->http_url_name.ptr = NULL, packet->http_url_name.len = 0, packet->http_encoding.ptr = NULL, packet->http_encoding.len = 0, packet->http_transfer_encoding.ptr = NULL, packet->http_transfe...
<vulnerable_code> s.add("org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource"); s.add("org.apache.tomcat.dbcp.dbcp.datasources.SharedPoolDataSource"); DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s); } <commit_title>[PATCH] MNSTR-5023 backport security fix from jackso...
<vulnerable_code>var quillMention=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e...
<vulnerable_code> path: "/admin/preinstalled-apps", controller: newAdminRoute, }); this.route("newAdminMaintenance", { path: "/admin/maintenance", controller: newAdminRoute,<commit_title>[PATCH] Implement IP blacklist for user-initiated requests.<commit_description><fixed_code> path: "/admin/prei...
<vulnerable_code><commit_title>[PATCH] Implement IP blacklist for user-initiated requests.<commit_description><fixed_code> // Sandstorm - Personal Cloud Sandbox // Copyright (c) 2017 Sandstorm Development Group, Inc. and contributors // All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "Lic...
<vulnerable_code>// See the License for the specific language governing permissions and // limitations under the License. ACCOUNT_DELETION_SUSPENSION_TIME = 7 * 60 * 60 * 24 * 1000; // 7 days in ms export { ACCOUNT_DELETION_SUSPENSION_TIME };<commit_title>[PATCH] Implement IP blacklist for user-initiated requests.<co...
<vulnerable_code>import { Match } from "meteor/check"; import { userPictureUrl, fetchPicture } from "/imports/server/accounts/picture.js"; import { waitPromise } from "/imports/server/async-helpers.js"; const Future = Npm.require("fibers/future"); const Url = Npm.require("url"); db.notifications.remove({ "admin.type...
<vulnerable_code><commit_title>[PATCH] Implement IP blacklist for user-initiated requests.<commit_description><fixed_code> // Sandstorm - Personal Cloud Sandbox // Copyright (c) 2017 Sandstorm Development Group, Inc. and contributors // All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "Lic...
<vulnerable_code>import { migrateToLatest } from "/imports/server/migrations.js"; import { ACCOUNT_DELETION_SUSPENSION_TIME } from "/imports/constants.js"; import { onInMeteor } from "/imports/server/async-helpers.js"; let url = require("url"); const Capnp = require("capnp"); deleteAccount); }); Meteor.startup(()...
<vulnerable_code>// limitations under the License. import { PersistentImpl } from "/imports/server/persistent.js"; const Future = Npm.require("fibers/future"); const Capnp = Npm.require("capnp"); }; } return { session: new Capnp.Capability(new ExternalWebSession(this.url, options), ApiSession) }; } }...
<vulnerable_code>const Capnp = Npm.require("capnp"); import { hashSturdyRef, checkRequirements, fetchApiToken } from "/imports/server/persistent.js"; import { inMeteor, waitPromise } from "/imports/server/async-helpers.js"; const EmailRpc = Capnp.importSystem("sandstorm/email.capnp"); const HackSessionContext = Capnp....
<vulnerable_code>import Url from "url"; import { inMeteor, waitPromise } from "/imports/server/async-helpers.js"; const Request = HTTPInternals.NpmModules.request.module; } doDownloadTo(out) { const url = Url.parse(this.url); const options = { hostname: url.hostname, port: url.port, pa...
<vulnerable_code> # General information about the project. project = "Cryptography" copyright = "2013-2020, Individual Contributors" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the<commit_title>[PATCH] correct bu...
<vulnerable_code>) __uri__ = "https://github.com/pyca/cryptography" __version__ = "3.3.1" __author__ = "The cryptography developers" __email__ = "cryptography-dev@python.org" __license__ = "BSD or Apache License, Version 2.0" __copyright__ = "Copyright 2013-2020 {}".format(__author__)<commit_title>[PATCH] correct bu...
<vulnerable_code>class _CipherContext(object): _ENCRYPT = 1 _DECRYPT = 0 _MAX_CHUNK_SIZE = 2 ** 31 - 1 def __init__(self, backend, cipher, mode, operation): self._backend = backend<commit_title>[PATCH] correct buffer overflows cause by integer overflow in openssl<commit_description><fixed_code>...
<vulnerable_code> __uri__ = "https://github.com/pyca/cryptography" __version__ = "3.3.1" __author__ = "The cryptography developers" __email__ = "cryptography-dev@python.org" __license__ = "BSD or Apache License, Version 2.0" __copyright__ = "Copyright 2013-2020 %s" % __author__<commit_title>[PATCH] correct buffer ov...
<vulnerable_code> var container = selectField.get('container'); var divSelect = container.one('.form-builder-select-field'); assert.isFalse(divSelect.hasClass('active')); divSelect.simulate('click'); assert.isTrue(divSelect.hasClass('active')); done(); } var containe...
<vulnerable_code> break; case 12: /* FLI LC chunk (byte delta) */ /* OOB Check ok, we have 10 bytes here */ y = I16(data); ymax = y + I16(data+2); data += 4; for (; y < ymax && y < state->ysize; y++) { UINT8* out = (UINT8*) im->image[y]; break; case 15: /* FLI BRUN chunk */ /*...
<vulnerable_code>const eos = require('end-of-stream') const { setup, connect, subscribe, subscribeMultiple, noError } = require('./helper') const aedes = require('../') test('test aedes.Server', function (t) { t.plan(1) }) }) ;[{ qos: 0, clean: false }, { qos: 0, clean: true }, { qos: 1, clean: false }, { qos: 1,...
<vulnerable_code> { Cipher c = crypto.createRSAEncryptionCipher(); c.init(Cipher.DECRYPT_MODE, rsaServerPrivateKey); M = c.doFinal(encryptedPreMasterSecret); } catch (Exception e) {<commit_title>[PATCH] Confirm size of decrypted PMS before using<commit_...
<vulnerable_code> @Override public void exportNode(File exportDirectory, ICourse course) { XStream xstream = XStreamHelper.createXStreamInstance(); ChecklistManager cm = ChecklistManager.getInstance(); Checklist checklist = loadOrCreateChecklist(course.getCourseEnvironment().getCoursePropertyManager()); Checkl...
<vulnerable_code> private static final String ELEM_LINK_TARGET = "Target"; private static final String ELEM_LINK_LANG = "Language"; private static HashMap<String, PortletInstitution> content; private static File fxConfXStreamFile; saveLinkList(content); FileUtils.copyFileToFile(fxConfFile, new File(fxConfFi...
<vulnerable_code> */ public boolean changeEMail(WindowControl wControl) { XStream xml = XStreamHelper.createXStreamInstance(); @SuppressWarnings("unchecked") HashMap<String, String> mails = (HashMap<String, String>) xml.fromXML(tempKey.getEmailAddress()); <commit_title>[PATCH] OO-5548: setup security of XStre...
<vulnerable_code> private static final XStream rulesXStream; static { rulesXStream = XStreamHelper.createXStreamInstance(); rulesXStream.alias("rules", Rules.class); rulesXStream.alias("rule", Rule.class); }<commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_description><fixed_code> priv...
<vulnerable_code> private static final XStream xstreamReader = XStreamHelper.createXStreamInstance(); static { xstreamReader.alias(XML_GLOSSARY_ITEM_NAME, GlossaryItem.class); xstreamReader.alias(XML_REVISION_NAME, Revision.class); } }); static { xstreamWriter.alias(XML_GLOSSARY_ITEM_NAME, GlossaryItem.cl...
<vulnerable_code> private static final XStream xstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(xstream); Class<?>[] types = new Class[] { DiscoveryImpl.class, NetZoneImpl.class, AppImpl.class, ActionImpl.class, ProofKeyImpl.class };<commit_title>[PATCH] OO-5548: setup...
<vulnerable_code> private static final XStream licenseXStream = XStreamHelper.createXStreamInstanceForDBObjects(); static { licenseXStream.alias("license", LicenseImpl.class); licenseXStream.alias("license", ResourceLicenseImpl.class); licenseXStream.alias("licenseType", LicenseTypeImpl.class);<commit_title>[P...
<vulnerable_code>public class PersistentTaskDAO { private static XStream xstream = XStreamHelper.createXStreamInstance(); @Autowired private DB dbInstance; ptask.setLastModified(currentDate); ptask.setName(name); ptask.setStatus(TaskStatus.newTask); ptask.setTask(xstream.toXML(task)); dbInstance.getCur...
<vulnerable_code> private static XStream mystream; static { mystream = XStreamHelper.createXStreamInstance(); XStream.setupDefaultSecurity(mystream); Class<?>[] types = new Class[] { VersionsFileImpl.class, RevisionFileImpl.class, VFSRevision.class, VFSMetadata.class, VFSMetadataImpl.class, Identity.clas...
<vulnerable_code>import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com @Service("mapperDao") public class MapperDAO { @Autowired private DB dbInstance; } m.setOriginalSessionI...
<vulnerable_code> private static final XStream xStream = XStreamHelper.createXStreamInstance(); static { xStream.alias("coursesite", CourseSiteConfiguration.class); xStream.alias("languageConfig", LanguageConfiguration.class); xStream.alias("siteconfig", SiteConfiguration.class);<commit_title>[PATCH] OO-5548: ...
<vulnerable_code> private static XStream historyReadStream = XStreamHelper.createXStreamInstance(); private static XStream historyWriteStream = XStreamHelper.createXStreamInstance(); static { //xstream config historyReadStream.omitField(BusinessGroup.class, "type"); historyReadStream.omitField(BusinessGroup.cla...
<vulnerable_code> private static final XStream xstream = XStreamHelper.createXStreamInstance(); static { xstream.ignoreUnknownElements(); } <commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_description><fixed_code> private static final XStream xstream = XStreamHelper.createXStreamInsta...
<vulnerable_code> * * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com */ public class EnhancedXStream extends XStream { public EnhancedXStream(boolean export) { super(); if (export) {<commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_description><fixed_code> * * @...
<vulnerable_code>import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.nio.file.Files; import java.nio.file.Path; * @author Felix Jost, Florian Gnaegi */ public class XStreamHelper { private static final String ENCODING = "UTF-8"; private static XStream unco...
<vulnerable_code> * @return */ static { //write XStream writeXstream.alias("com.frentix.olat.course.nodes.ViteroCourseNode", ViteroCourseNode.class); writeXstream.alias("BookSection", BookSectionImpl.class);<commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_description><fixed_code> *...
<vulnerable_code> private static final XStream configXstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(configXstream); Class<?>[] types = new Class[] { ExportFormat.class }; configXstream.addPermission(new ExplicitTypePermission(types)); configXstream.alias(QTI_EXPORT_ITE...
<vulnerable_code> @Autowired private UserManager userManager; private final XStream xstream = XStreamHelper.createXStreamInstance(); /** * Updates the users efficiency statement for this course. <p> } efficiencyProperty.setLastModified(new Date()); efficiencyProperty.setStatementXml(xstream.toXML(efficie...
<vulnerable_code>import org.olat.core.logging.activity.ThreadLocalUserActivityLogger; import org.olat.core.util.StringHelper; import org.olat.core.util.vfs.VFSLeaf; import org.olat.core.util.xml.XStreamHelper; import org.olat.course.assessment.AssessmentHelper; import org.olat.course.assessment.EfficiencyStatement; imp...
<vulnerable_code>public class CustomConfigManager { private static final Logger log = Tracing.createLoggerFor(CustomConfigManager.class); private static final String IFRAME_CSS = "iframe.css"; private static final String MAIN_CSS = "main.css"; configTarget = themeBase.createChildLeaf(CUSTOM_CONFIG_XML); } ...
<vulnerable_code> File projectBrokerFile = new File(folderNodeData, "projectbroker.xml"); if (projectBrokerFile.exists()) { XStream xstream = XStreamHelper.createXStreamInstance(); ProjectGroupManager projectGroupManager = CoreSpringFactory.getImpl(ProjectGroupManager.class); ProjectBrokerConfig broker...
<vulnerable_code> private static final Logger log = Tracing.createLoggerFor(GTAManagerImpl.class); private static final XStream taskDefinitionsXstream = XStreamHelper.createXStreamInstance(); @Autowired private DB dbInstance;<commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_description><...
<vulnerable_code> public GroupXStream() { xstream = XStreamHelper.createXStreamInstance(); XStream.setupDefaultSecurity(xstream); Class<?>[] types = new Class[] { CollabTools.class, Group.class, Area.class, AreaCollection.class, GroupCollection.class, OLATGroupExport.class, ArrayList.class<commit_tit...
<vulnerable_code> private static XStream configXstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(configXstream); Class<?>[] types = new Class[] { CPPackageConfig.class, DeliveryOptions.class };<commit_title>[PATCH] OO-5548: setup security of XStream by default<commit_de...
<vulnerable_code> private static XStream configXstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(configXstream); Class<?>[] types = new Class[] { QTI21DeliveryOptions.class, QTI21AssessmentResultsOptions.class };<commit_title>[PATCH] OO-5548: setup security of XStream b...
<vulnerable_code>import javax.annotation.PostConstruct; import org.apache.logging.log4j.Logger; import org.apache.pdfbox.io.IOUtils; import org.olat.basesecurity.IdentityImpl; import org.olat.core.gui.media.MediaResource; import org.olat.core.gui.translator.Translator; @PostConstruct public void init() { logXStre...
<vulnerable_code> private static final XStream xstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(xstream); Class<?>[] types = new Class[] { ImageSettings.class, ImageHorizontalAlignment.class, ImageTitlePosition.class, ImageSize.class, TextSettings.class, ContainerSet...
<vulnerable_code> private static final XStream xstream = XStreamHelper.createXStreamInstanceForDBObjects(); static { XStream.setupDefaultSecurity(xstream); Class<?>[] types = new Class[] { Curriculum.class, CurriculumImpl.class, CurriculumElement.class, CurriculumElementImpl.class, CurriculumElementType....
<vulnerable_code> private static final XStream disadvantageCompensationXStream = XStreamHelper.createXStreamInstanceForDBObjects(); static { disadvantageCompensationXStream.alias("disadvantageCompensation", DisadvantageCompensationImpl.class); disadvantageCompensationXStream.ignoreUnknownElements(); <commit_ti...
<vulnerable_code> private static final XStream xstream = XStreamHelper.createXStreamInstance(); static { XStream.setupDefaultSecurity(xstream); Class<?>[] types = new Class[] { Choice.class, Choices.class, Container.class, Disclaimer.class, FileStoredData.class, FileUpload.class, Form.class, HTMLParagraph...
<vulnerable_code> private static final XStream lectureBlockXStream = XStreamHelper.createXStreamInstanceForDBObjects(); static { lectureBlockXStream.ignoreUnknownElements(); lectureBlockXStream.alias("lectureBlock", LectureBlockImpl.class); private static final XStream rollCallXStream = XStreamHelper.create...