text stringlengths 79 3.72M |
|---|
<vulnerable_code>package fr.Dianox.Hawn.Utility;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import fr.Dianox.Hawn.Main;
public class PlayerVisibility {
public static List<Player> PVPlayer = new ArrayList<Player>();
private static List<String> Co... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Scoreboard;
import me.clip.placeholderapi.PlaceholderAPI;
import fr.Dianox.Hawn.Utility.MessageUtils;
import fr.Dianox.Hawn.Utility.Config.ConfigGeneral;
import fr.Dianox.Hawn.Utility.Scoreboard.PlayerReceiveBoardEvent;
import fr.Dianox.Hawn.Utility.Scoreboard.WhenPlugin... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Scoreboard;
import fr.Dianox.Hawn.Utility.Scoreboard.PlayerBoard;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import java.util.List;
public class PlayerReceiveBoardEvent exten... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Scoreboard;
import org.bukkit.configuration.file.YamlConfiguration;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class ScoreboardInfo {
private YamlConfiguration cfg;
private String permission;
private List<String> te... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Scoreboard;
import org.bukkit.ChatColor;
import java.util.ArrayList;
import java.util.List;
/**
* A util to scroll coloured Strings
*
* @author Chinwe
*/
public class Scroller {
private static final char COLOUR_CHAR = '§';
public int width, spaceBetween;
... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Scoreboard;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class WhenPluginUpdateTextEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private Player p;
private... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Server;
public class Tps implements Runnable {
public static int TICK_COUNT = 0;
public static long[] TICKS = new long['ǝ'];
public static long LAST_TICK = 0L;
public static double getTPS() {
return getTPS(100);
}
public static double getTPS(int ticks) {
... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Server;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import fr.Dianox.Hawn.Main;
import fr.Dianox.Hawn.Utility.MessageUtils;
import fr.Dianox.Hawn.Utility.Config.Messages.Adminstration.In... |
<vulnerable_code>package fr.Dianox.Hawn.Utility;
import org.bukkit.entity.Player;
import fr.Dianox.Hawn.Utility.Config.ConfigSpawn;
public class SpawnUtils {
public static void teleportToSpawn(Player player, String str) {
try {
org.bukkit.World w = org.bukkit.Bukkit.getServer().getWorld(Config... |
<vulnerable_code>package fr.Dianox.Hawn.Utility;
import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import fr.Dianox.Hawn.Main;
import fr.Dianox.Hawn.Utility.Config.Tab.NameTagConfig;
public class Tablist {
public static String getServerVersion() {
return Bukkit.getServer().g... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Tasks;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitRunnable;
public class TaskReloadServer extends BukkitRunnable {
@Override
public void run() {
Bukkit.getServer().reload();
}
}<commit_title>[PATCH] Major code and performance improvements. Fixed ... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Tasks;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitRunnable;
public class TaskSavePlayerServer extends BukkitRunnable {
@Override
public void run() {
Bukkit.getServer().savePlayers();
}
}<commit_title>[PATCH] Major code and performance improvement... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.Tasks;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitRunnable;
public class TaskShutdownServer extends BukkitRunnable {
@Override
public void run() {
Bukkit.getServer().shutdown();
}
}<commit_title>[PATCH] Major code and performance improvements. Fi... |
<vulnerable_code>package fr.Dianox.Hawn.Utility;
import java.lang.reflect.Constructor;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import fr.Dianox.Hawn.Commands.PingComma... |
<vulnerable_code>package fr.Dianox.Hawn.Utility;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
public class VersionUtils {
static String versionsS = "";
public static void onGetServerVersiononLoad() {
versionsS = Bukkit.getVersion();
if (!versionsS.contains("1.14") && !versionsS.contains("1.1... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.AutoBroadcastConfig;
import fr.Dianox.Hawn.Utility.Config.Events.OnJoinConfig;
import fr.Dianox.Hawn.Utility.Config.Events.PlayerEventsConfig;
impor... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.PlayerWorldChangeConfigE;
public class ChangeWorldPW {
// Fly
public static List<String> world_change_keepfly = new ArrayList<String>()... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.CustomJoinItem.SpecialCjiHidePlayers;
public class CjiPW {
public static List<String> worlds_po_playervisibility_item = new ArrayList<String>();... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.ConfigGJoinQuitCommand;
public class CommandsPW {
public static List<String> worlds_JoinCommands_Player_New = new ArrayList<String>();
p... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.CosmeticsFun.ConfigGCos;
import fr.Dianox.Hawn.Utility.Config.CosmeticsFun.ConfigGLP;
public class CosmeticsPW {
public static List<String> worl... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.OnJoinConfig;
import fr.Dianox.Hawn.Utility.Config.Messages.ConfigMGeneral;
public class OnJoinPW {
// MOTD
public static List<String> m... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Messages.ConfigMGeneral;
public class OnQuitPW {
// Quit message
public static List<String> qm_world = new ArrayList<String>();
public stat... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.OtherFeaturesConfig;
public class OtherFeaturesPW {
public static List<String> worlds_ColorSign = new ArrayList<String>();
public stat... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.CosmeticsFun.ConfigFDoubleJump;
import fr.Dianox.Hawn.Utility.Config.Events.OnJoinConfig;
import fr.Dianox.Hawn.Utility.Config.Events.PlayerEventsCo... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.ConfigGProtection;
public class ProtectionPW {
public static List<String> worlds_c_place = new ArrayList<String>();
public static List<S... |
<vulnerable_code>package fr.Dianox.Hawn.Utility.World;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import fr.Dianox.Hawn.Utility.Config.Events.WorldEventConfig;
public class WorldPW {
// WEATHER
public static List<String> worlds_weather = new ArrayList<String>();
public stati... |
<vulnerable_code>//
// Common support functions for pdfio.
//
// Copyright © 2021 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
else if (_pdfioFileSeek(pdf, (off_t)bytes, SEEK_CUR) < 0)
return (false);
return (true);
}
return (rbytes);
}
/... |
<vulnerable_code>//
// PDF dictionary functions for PDFio.
//
// Copyright © 2021-2022 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
_pdfioFileError(pdf, "Invalid dictionary contents.");
break;
}
// Then get the next value...
if (... |
<vulnerable_code>//
// PDF file functions for PDFio.
//
// Copyright © 2021-2022 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
return (false);
}
_pdfioTokenFlush(&tb);
if (!pdf->trailer_dict)<commit_title>[PATCH] Fix denial-of-service... |
<vulnerable_code>//
// PDF object functions for PDFio.
//
// Copyright © 2021-2022 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.<commit_title>[PATCH] Fix denial-of-service attack when reading corrupt PDF files.<commit_description><fixed_code>
//
// PDF ob... |
<vulnerable_code>//
// PDF token parsing functions for PDFio.
//
// Copyright © 2021 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
if (tb->num_tokens > 0)
{
// Yes, return it...
tb->num_tokens --;
strncpy(buffer, tb->tokens[tb->num_tokens]... |
<vulnerable_code>//
// PDF value functions for PDFio.
//
// Copyright © 2021 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.<commit_title>[PATCH] Fix denial-of-service attack when reading corrupt PDF files.<commit_description><fixed_code>
//
// PDF value fu... |
<vulnerable_code>** (3b) the FROM clause of the subquery may not contain a virtual
** table and
** (3c) the outer query may not be an aggregate.
**
** (4) The subquery can not be DISTINCT.
**
*/
if( (pSubitem->fg.jointype & JT_OUTER)!=0 ){
isLeftJoin = 1;
if( pSubSrc->nSrc>1 || ... |
<vulnerable_code>import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.sax.SAXSource... |
<vulnerable_code>import java.util.zip.ZipFile;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.junit.After;
import org.junit.Before;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.launching... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jface.text.templat... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.dom.DOMSource;
import javax.xml.tran... |
<vulnerable_code>
import org.eclipse.jdt.internal.ui.IJavaStatusConstants;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Reads data from an InputStream and returns a JarPackage
}
public JarPackageData readXML(JarPackageData jarPackage) throws IOException, SAXException {
DocumentBuilderFactory factory= D... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jdt.internal.ui.I... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.debug.core.ILaunch... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.debug.core.ILaunc... |
<vulnerable_code>
import org.eclipse.core.runtime.Assert;
/**
* Reads data from an InputStream and returns a JarPackage
public Element readXML() throws IOException, SAXException {
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
factory.setValidating(false);
DocumentBuilder parser= null... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jdt.core.IJavaProj... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jdt.internal.ui.Ja... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jdt.internal.ui.Ja... |
<vulnerable_code>import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.jdt.internal.ui.Ja... |
<vulnerable_code> fSessionFound= false;
try {
source.setSystemId("/"); //$NON-NLS-1$
createParser(SAXParserFactory.newInstance()).parse(source, this);
if (!fSessionFound)
throw new CoreException(new Status(IStatus.ERROR, RefactoringCorePlugin.getPluginId(), IRefactoringCoreStatusCodes.REFACTORING_HISTOR... |
<vulnerable_code>import java.util.Comparator;
import java.util.List;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
Assert.isTrue(flags >= RefactoringDescriptor.NONE);
try {
if (fDocument == null)
f... |
<vulnerable_code>import java.util.TimeZone;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.InputSource;
import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin;
import org.eclipse.ltk.i... |
<vulnerable_code>/*
** Copyright (C) 2002-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2003 Ross Bencina <rbencina@iprimus.com.au>
**
** This program is free software; you can redistribute it and/or modify
{ sf_count_t total = 0 ;
ssize_t count ;
if (psf->virtual_io)
return psf->vio.write (ptr, ... |
<vulnerable_code> *p2 = L'\0';
}
}
if (path == p2) {
*norm_size = 0;
} else{
*norm_size = p2 - path + 1;
}
#undef SEP_OR_END
#undef IS_SEP
#undef IS_END<commit_title>[PATCH] fix norm_size calculation<commit_description><fixed_code>
*p2 = L'\0';
}
... |
<vulnerable_code> defaults.update(kwargs)
return super().formfield(**kwargs)<commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdo... |
<vulnerable_code>import socket
import string
import sys
from datetime import datetime
import django.conf.locale
from django.core.files.storage import default_storage
'import_export', # Import / export tables to file
'django_cleanup.apps.CleanupConfig', # Automatically delete orphaned ... |
<vulnerable_code>
re_path(r'^api/', include(apipatterns)),
re_path(r'^api-doc/', include_docs_urls(title='InvenTree API')),
# 3rd party endpoints
re_path(r'^markdownx/', include('markdownx.urls')),
]
frontendpatterns = [<commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_descripti... |
<vulnerable_code># Generated by Django 2.2.9 on 2020-02-01 12:47
from django.db import migrations
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='build',
name='notes',
field=markdownx.models.MarkdownxField(blank=True, help_... |
<vulnerable_code>import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import mptt.fields
migrations.AlterField(
model_name='build',
name='notes',
field=markdownx.models.MarkdownxField(blank=True, hel... |
<vulnerable_code><commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdownx integration
- Adds character limit for notes fields`
* Adjust legacy m... |
<vulnerable_code>from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from markdownx.models import MarkdownxField
from mptt.models import MPTTModel, TreeForeignKey
from mptt.exceptions import InvalidMove
blank=True, help_text=_('Link to external URL')
)
notes = Mark... |
<vulnerable_code># Generated by Django 2.2.9 on 2020-02-01 12:31
from django.db import migrations
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='company',
name='notes',
field=markdownx.models.MarkdownxField(blank=True),
... |
<vulnerable_code>import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import stdimage.models
migrations.AlterField(
model_name='company',
name='notes',
field=markdownx.models.MarkdownxField(blank=Tru... |
<vulnerable_code><commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdownx integration
- Adds character limit for notes fields`
* Adjust legacy m... |
<vulnerable_code>from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from markdownx.models import MarkdownxField
from moneyed import CURRENCIES
from stdimage.models import StdImageField
import common.models
import common.settings
import InvenTree.validators
from common.settings impo... |
<vulnerable_code># Generated by Django 2.2.9 on 2020-02-01 23:46
from django.db import migrations
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='purchaseorder',
name='notes',
field=markdownx.models.MarkdownxField(blank=Tru... |
<vulnerable_code>import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
class Migration(migrations.Migration):
('status', models.PositiveIntegerField(choices=[(10, 'Pending'), (20, 'Placed'), (30, 'Complete'), (40, 'Cancelled'), ... |
<vulnerable_code>import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='purchaseorder',
name='notes',
field=markdownx.models.Ma... |
<vulnerable_code>from django.db import migrations, models
import django.db.models.deletion
import order.models
import markdownx.models
class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('shipment... |
<vulnerable_code><commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdownx integration
- Adds character limit for notes fields`
* Adjust legacy m... |
<vulnerable_code>from djmoney.contrib.exchange.exceptions import MissingRate
from djmoney.contrib.exchange.models import convert_money
from djmoney.money import Money
from markdownx.models import MarkdownxField
from mptt.models import TreeForeignKey
import InvenTree.helpers
from common.settings import currency_code_de... |
<vulnerable_code># Generated by Django 2.2.9 on 2020-01-31 10:22
from django.db import migrations
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='part',
name='notes',
field=markdownx.models.MarkdownxField(help_text='Part no... |
<vulnerable_code>import InvenTree.fields
import InvenTree.validators
import markdownx
from django.db import migrations, models
migrations.AlterField(
model_name='part',
name='notes',
field=markdownx.models.MarkdownxField(blank=True, help_text='Part notes - supports Markdo... |
<vulnerable_code>import InvenTree.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import mptt.fields
import part.settings
migrations.AlterField(
model_name='part',
name='notes',
field=markdownx.models.MarkdownxFiel... |
<vulnerable_code><commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdownx integration
- Adds character limit for notes fields`
* Adjust legacy m... |
<vulnerable_code>from djmoney.contrib.exchange.exceptions import MissingRate
from djmoney.contrib.exchange.models import convert_money
from jinja2 import Template
from markdownx.models import MarkdownxField
from mptt.exceptions import InvalidMove
from mptt.managers import TreeManager
from mptt.models import MPTTModel, ... |
<vulnerable_code> self.assertFalse('hello' in part.metadata)
self.assertEqual(part.metadata['x'], 'y')
class PartAPIAggregationTest(InvenTreeAPITestCase):
"""Tests to ensure that the various aggregation annotations are working correctly..."""<commit_title>[PATCH] Remove reliance on django-markdownx... |
<vulnerable_code># Generated by Django 2.2.9 on 2020-02-02 01:03
from django.db import migrations
import markdownx.models
class Migration(migrations.Migration):
migrations.AlterField(
model_name='stockitem',
name='notes',
field=markdownx.models.MarkdownxField(blank=True, h... |
<vulnerable_code>import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import mptt.fields
migrations.AlterField(
model_name='stockitem',
name='notes',
field=markdownx.models.MarkdownxField(blank=True,... |
<vulnerable_code><commit_title>[PATCH] Remove reliance on django-markdownx (#3231)<commit_description>* Remove reliance on django-markdownx
- We are now rendering notes on the client side using easymde
- No longer any need to utilize the markdownx integration
- Adds character limit for notes fields`
* Adjust legacy m... |
<vulnerable_code>from django.utils.translation import gettext_lazy as _
from jinja2 import Template
from markdownx.models import MarkdownxField
from mptt.managers import TreeManager
from mptt.models import MPTTModel, TreeForeignKey
import label.models
import report.models
from company import models as CompanyModels
f... |
<vulnerable_code><commit_title>[PATCH] [edge-preview-authenticated-proxy] Deploy validation fixes<commit_description><fixed_code>
def mul(a,b):
return a*b |
<vulnerable_code><commit_title>[PATCH] [edge-preview-authenticated-proxy] Deploy validation fixes<commit_description><fixed_code>
def add(a, b):
return a + b |
<vulnerable_code> ignorePatterns: [
"dist",
"scripts",
// template files are ignored by the eslint-config-worker configuration
// we do however want the c3 files to be linted
"!**/templates/**/c3.ts",<commit_title>[PATCH] [edge-preview-authenticated-proxy] Deploy validation fixes<commit_description><fixed_cod... |
<vulnerable_code><commit_title>[PATCH] [edge-preview-authenticated-proxy] Deploy validation fixes<commit_description><fixed_code>
module.exports = {
root: true,
extends: ["@cloudflare/eslint-config-worker"],
}; |
<vulnerable_code> however the last argument provides the output filename.
*/
static MagickBooleanType ConcatenateImages(int argc,char **argv,
ExceptionInfo *exception )
{
FILE
*input,
*output;
int
c;
if (ExpandFilenames(&argc,&argv) == MagickFalse)
ThrowFileException(exception,ResourceLi... |
<vulnerable_code>from rencode import rencode_orig
# Hack to deal with python 2 and 3 differences with unicode literals.
if sys.version < '3':
import codecs
def u(x):
return codecs.unicode_escape_decode(x)[0]
else:
unicode = str
def u(x):
return x
class TestRencode(unittest.TestCase):... |
<vulnerable_code> ].forEach((data)=>(expectTypeError([data])));
[
undefined,
null,
{},
"",<commit_title>[PATCH] remove invalid test<commit_description>can't test undefined there in that way<fixed_code>
].forEach((data)=>(expectTypeError([data])));
[
nul... |
<vulnerable_code>
auth_client_send_cancel(request->conn->client, request->id);
call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL);
}
unsigned int auth_client_request_get_id(struct auth_client_request *request)<commit_title>[PATCH] lib-auth: Fix memory leak in auth_client_request_abort()<commit_description... |
<vulnerable_code>#include "html.h"
#include "autolink.h"
#define SNUDOWN_VERSION "1.6.0"
enum snudown_renderer_mode {
RENDERER_USERTEXT = 0,<commit_title>[PATCH] Hash-collision denial-of-service vulnerabilities (#87)<commit_description>* Add case insensitive SipHash implementation
* Replace ref hash function with Si... |
<vulnerable_code>
#include "markdown.h"
#include "stack.h"
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#if defined(_WIN32)
#define strncasecmp _strnicmp
#endif
unsigned int id;
struct buf *link;
struct buf *title;
struct link_ref *next;
int in_link_body;
};
/*****************... |
<vulnerable_code><commit_title>[PATCH] Hash-collision denial-of-service vulnerabilities (#87)<commit_description>* Add case insensitive SipHash implementation
* Replace ref hash function with SipHash
* Add label to link_ref struct.
* Update find_link_ref to compare link labels as well as hashes
* Update add_link_ref to... |
<vulnerable_code><commit_title>[PATCH] Regression test for<commit_description><fixed_code>
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, CopyTmpFiles, path, check_no_ASAN_UBSAN_errors
class Jp2ImageEncodeJp2HeaderOutOfBoundsRead2(metaclass=CaseMeta):
"""
Regression test for the bug described in:
... |
<vulnerable_code> arg = US"";
pam_arg_ended = TRUE;
}
reply[i].resp = CS string_copy_malloc(arg); /* PAM frees resp */
reply[i].resp_retcode = PAM_SUCCESS;
break;
<commit_title>[PATCH] Fix PAM auth. Bug 2813<commit_description><fixed_code>
arg = US"";
pam_arg_ended = TRUE;
}
reply[i].resp ... |
<vulnerable_code>/* Copyright Joyent, Inc. and other Node contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights t... |
<vulnerable_code>
/* Don't allow faking input to the controlling tty (CVE-2017-5226) */
{SCMP_SYS (ioctl), EPERM, &SCMP_A1 (SCMP_CMP_MASKED_EQ, 0xFFFFFFFFu, (int) TIOCSTI)},
/* seccomp can't look into clone3()'s struct clone_args to check whether
* the flags are OK, so we have no choice but to block c... |
<vulnerable_code> }
}
#endif
else if (strcmp (arg, "listen") == 0)
{
/* If not blocked by seccomp, this will fail with EBADF */<commit_title>[PATCH] run: Prevent TIOCLINUX ioctl, the same as TIOCSTI<commit_description>The TIOCLINUX ioctl is only available on Linux virtual conso... |
<vulnerable_code> throw new TypeError('option secretLength must be finite number > 1')
}
var validity = Number.isInteger(opts.validity) === true
? opts.validity
: 0
<commit_title>[PATCH] fix<commit_description><fixed_code>
throw new TypeError('option secretLength must be finite number > 1')
}
v... |
<vulnerable_code> self.assertAllGreater(samples, 0.)
self.assertAllGreater(samples_stateless, 0.)
def testStatelessParameterizedTruncatedNormalHasGrads(self):
mean = variables.Variable(0.01)
stddev = variables.Variable(1.)<commit_title>[PATCH] Fix tensor shape dtype bug in parameterized_truncated_... |
<vulnerable_code>
static int output_rr_packet(const void *d, size_t l, int ifindex) {
_cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
_cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
int r;
r = dns_packet_new(&p, DNS_PROTOCOL_DNS, 0, DNS_PACKET_SIZE_MAX);
if... |
<vulnerable_code> return 0;
}
static const char* const dnssec_algorithm_table[_DNSSEC_ALGORITHM_MAX_DEFINED] = {
/* Mnemonics as listed on https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml */
[DNSSEC_ALGORITHM_RSAMD5] = "RSAMD5",<commit_title>[PATCH] reso... |
<vulnerable_code>#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: apprentice.c,v 1.209 2014/05/13 16:42:17 christos Exp $")
#endif /* lint */
#include "magic.h"
if ((ms->flags & MAGIC_CHECK) == 0)
return 0;
if (m->type != FILE_PSTRING && (m->str_flags & PSTRING_LEN) != 0) {
file_magwarn(ms,
"'/BHhLl... |
<vulnerable_code>#include "file.h"
#ifndef lint
FILE_RCSID("@(#)$File: softmagic.c,v 1.188 2014/05/14 23:15:42 christos Exp $")
#endif /* lint */
#include "magic.h"
private int32_t moffset(struct magic_set *, struct magic *);
private void mdebug(uint32_t, const char *, size_t);
private int mcopy(struct magic_set *, u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.