text
stringlengths
79
3.72M
<vulnerable_code>from rest_framework import response, status from rest_framework_simplejwt import views as jwt_views from rest_framework_simplejwt.exceptions import InvalidToken, TokenError from rest_framework.throttling import ScopedRateThrottle from rest_framework.views import APIView from modoboa.core.password_hash...
<vulnerable_code>from modoboa.core.api.v1 import serializers as core_v1_serializers from modoboa.core.api.v1 import viewsets as core_v1_viewsets from modoboa.lib import pagination from modoboa.lib.throttle import UserLesserDdosUser, UserDdosPerView from ... import constants from ... import models class AccountViewSet(...
<vulnerable_code> from rest_framework import permissions, response, viewsets from rest_framework.decorators import action from rest_framework.throttling import UserRateThrottle from modoboa.admin import models as admin_models from modoboa.lib.throttle import UserDdosPerView from . import serializers class DNSViewSe...
<vulnerable_code>from rest_framework.throttling import SimpleRateThrottle, AnonRateThrottle from django.urls import resolve class UserDdosPerView(SimpleRateThrottle): 'ident': ident } class UserLesserDdosUser(SimpleRateThrottle): """Custom Throttle class for rest_framework. The throttling is a...
<vulnerable_code> from rest_framework import mixins, viewsets from rest_framework.permissions import DjangoModelPermissions, IsAuthenticated from rest_framework.throttling import UserRateThrottle from modoboa.core import models as core_models from modoboa.lib.throttle import UserLesserDdosUser from . import serializer...
<vulnerable_code> from drf_spectacular.utils import extend_schema from rest_framework import filters, permissions, response, viewsets from rest_framework.throttling import UserRateThrottle from modoboa.admin import models as admin_models from modoboa.lib import pagination from modoboa.lib.throttle import UserDdosPerVi...
<vulnerable_code>from rest_framework.decorators import action from rest_framework.throttling import UserRateThrottle from modoboa.lib.throttle import UserDdosPerView from . import serializers from ... import tools class ParametersViewSet(viewsets.ViewSet): """Parameter viewset.""" lookup_value_regex = r"\w...
<vulnerable_code>from rest_framework.throttling import UserRateThrottle from modoboa.admin import models as admin_models from modoboa.lib.throttle import UserLesserDdosUser from modoboa.lib.viewsets import RevisionModelMixin from . import serializers class RelayDomainViewSet(RevisionModelMixin, viewsets.ModelViewSet...
<vulnerable_code> from drf_spectacular.utils import extend_schema from rest_framework import permissions, response, viewsets from rest_framework.throttling import UserRateThrottle from modoboa.lib.throttle import UserDdosPerView from . import serializers from ... import backends class TransportViewSet(viewsets.View...
<vulnerable_code> import router from '../router' import store from '../store' import app from '../App.vue' const _axios = axios.create() return Promise.reject(error) } if (error.response.status === 429) { app.showNotification() return Promise.reject(error) } if (error.response.status...
<vulnerable_code>from rest_framework.exceptions import ParseError from rest_framework.permissions import DjangoModelPermissions, IsAuthenticated from rest_framework.response import Response from rest_framework.throttling import UserRateThrottle from modoboa.core import models as core_models from modoboa.core import sm...
<vulnerable_code>) from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.throttling import UserRateThrottle from modoboa.admin.api.v1 import viewsets as v1_viewsets from modoboa.core import models as core_models from modoboa.lib import renderers as lib_...
<vulnerable_code> from rest_framework import permissions, response, viewsets from rest_framework.decorators import action from rest_framework.throttling import UserRateThrottle from drf_spectacular.utils import extend_schema <commit_title>[PATCH 01/14] Api throttling<commit_description><fixed_code> from rest_framewor...
<vulnerable_code>from rest_framework.authtoken.models import Token from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.throttling import UserRateThrottle from rest_framework_simplejwt.tokens import RefreshToken from modoboa.admin.api.v1 import seriali...
<vulnerable_code> def get_throttles(self): """Give lesser_ddos to GET type actions and ddos to others.""" throttle_classes = [UserRateThrottle()] if self.action in ["list", "retrieve", "validate", "dns_detail", "me", "dns_detail"]: throttle_classes.append(UserLesserDdosUser(...
<vulnerable_code>from drf_spectacular.utils import extend_schema, OpenApiParameter from rest_framework import response, viewsets from rest_framework.decorators import action from rest_framework.throttling import UserRateThrottle from modoboa.lib.throttle import GetThrottleViewsetMixin <commit_title>[PATCH 01/14] Api t...
<vulnerable_code> from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissions, IsAuthenticated from rest_framework.throttling import UserRateThrottle from modoboa.admin import models as admin_models from modoboa.lib.throttle import GetThrottleViewsetMixin<commit_title>[PATCH 01/14...
<vulnerable_code> REST_FRAMEWORK = { 'DEFAULT_THROTTLE_RATES': { 'user': '400/minute', 'ddos': '100/second', 'ddos_lesser': '300/minute', 'login': '10/minute', 'password_recovery_request': '6/hour', 'password_recovery_totp_check': '40/hour', 'password_recovery...
<vulnerable_code> import router from '../router' import store from '../store' const _axios = axios.create() _axios.interceptors.request.use( function (config) { return Promise.reject(error) } if (error.response.status === 429) { store.showNotification() return Promise.reject(error) } ...
<vulnerable_code> gulpUtil.env.systemBannerSeverity : '', /** * Allows to override disable skip button option on the backend. */ enableSkipButton: gulpUtil.env.enableSkipButton !== undefined ? gulpUtil.env.enableSkipButton : ...
<vulnerable_code> if (firstPost) { const excerpt = truncate(firstPost.contentPlain(), 175); items.add('excerpt', m.trust(excerpt), -100); } } });<commit_title>[PATCH] Fix evaluation of post content by m.trust()<commit_description><fixed_code> if (firstPost) { const excerp...
<vulnerable_code> /* Do the bind/connect... */ if (info->action==ACTION_CONNECT) { rv = zsocket_connect(*sock, info->description); if (rv == -1) { errmsg.LogError(0, RS_RET_INVALID_PARAMS, } DBGPRINTF("imzmq3: connect for %s successful\n",i...
<vulnerable_code>}; // Inlined partial `escape-goat` package window.escape = input => input .replace(/&/g, '&amp;') .replace(/"/g, '&quot;') .replace(/'/g, '&#39;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;'); window.escapeTag = (input, ...parts) => { let output = input[0]; for (let i = 0; i < parts.length; ...
<vulnerable_code> } } } output += '</div>' + ((! opt_data.readOnly) ? '<div class="drop-chosen ' + soy.$$escapeHtmlAttribute(opt_data.multiple && opt_data.value.length > 0 ? '' : 'hide') + '"><div class="search-chosen"><div class="select-search-container">' + ((opt_data.selectSearchIcon) ? '<a class="" hre...
<vulnerable_code> sz_phdrs = 0; return; } e_phoff = get_te32(&ehdri.e_phoff); e_shoff = get_te32(&ehdri.e_shoff); sz_phdrs = e_phnum * e_phentsize; if (f && Elf32_Ehdr::ET_DYN!=e_type) { sz_phdrs = 0; return; } e_phoff = get_te64(&ehdri.e_phoff); e_shoff =...
<vulnerable_code>import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.MalformedURLException;<commit_title>[PATCH] Added missing import<commit_description><fixed_code> import java.io.OutputStream...
<vulnerable_code> resizable: false, iconCls: Ext.baseCSSPrefix + "grid-cell-booleaniconcolumn-switch" },{ text: _("Shared folder"), sortable: true, dataIndex: "sharedfoldername", stateId: "dayofweek", renderer: OMV.util.Format.arrayRenderer(Date.mapDayOfWeek) },{ text: _("Comment"), sortable: true, ...
<vulnerable_code> stateful: true, stateId: "3107db90-c1e9-11e0-90c8-00221568ca88", columns: [{ text: _("Id"), sortable: true, dataIndex: "id", stateId: "id" },{ text: _("Device"), sortable: true, dataIndex: "devicefile", stateId: "devicefile" },{ text: _("SCSI Id."), sortable: true, dataIndex:...
<vulnerable_code> resizable: false, iconCls: Ext.baseCSSPrefix + "grid-cell-booleaniconcolumn-switch" },{ text: _("Shared folder"), sortable: true, dataIndex: "sharedfoldername", stateId: "sharedfoldername" },{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>[PATCH] Improve fo...
<vulnerable_code> stateful: true, stateId: "a6faec48-f389-11e1-8b67-00221568ca88", columns: [{ text: _("Network"), sortable: true, dataIndex: "network", stateId: "network" },{ text: _("Gateway"), sortable: true, dataIndex: "gateway", stateId: "gateway" },{ text: _("Comment"), sortable: true, d...
<vulnerable_code> resizable: false, iconCls: Ext.baseCSSPrefix + "grid-cell-booleaniconcolumn-switch" },{ text: _("Shared folder"), sortable: true, dataIndex: "sharedfoldername", stateId: "sharedfoldername" },{ text: _("External storage device"), sortable: true, dataIndex: "devicefile", stateId: "...
<vulnerable_code><commit_title>[PATCH] Improve foreign content handling.<commit_description><fixed_code> /** * This file is part of OpenMediaVault. * * @license http://www.gnu.org/licenses/gpl.html GPL Version 3 * @author Volker Theile <volker.theile@openmediavault.org> * @copyright Copyright (c) 2009-2017 Vo...
<vulnerable_code> }) }], columns: [{ text: _("Name"), sortable: true, dataIndex: "name", stateful: true, stateId: "d7c66fd9-2ef5-4107-9a6f-562dcdc2643a", columns: [{ text: _("Name"), sortable: true, dataIndex: "name", stateId: "name" },{ text: _("Comment"), sortable: true, dataIndex: "comment...
<vulnerable_code> stateful: true, stateId: "9ab0d7f9-73e0-4815-8960-84157d4b85e5", columns: [{ text: _("Name"), sortable: true, dataIndex: "name", dataIndex: "device", stateId: "device" },{ text: _("Relative Path"), sortable: true, dataIndex: "reldirpath", stateId: "reldirpath" },{ text: _("Abso...
<vulnerable_code> }) }], columns: [{ text: _("Name"), sortable: true, dataIndex: "name", stateful: true, stateId: "98d6fe31-8e12-407b-82f2-7e0acf4006c1", columns: [{ text: _("Name"), sortable: true, dataIndex: "name", stateId: "name" },{ text: _("Email"), sortable: true, dataIndex: "email", ...
<vulnerable_code> stateful: true, stateId: "4da5f715-4381-4c6b-8c83-ab23d284d0e3", columns: [{ text: _("Shared folder"), sortable: true, dataIndex: "sharedfoldername", stateId: "sharedfoldername" },{ text: _("Client"), sortable: true, dataIndex: "client", return value; } },{ text: _("Comment"),...
<vulnerable_code> "remote": _("Remote") } },{ text: _("Source"), sortable: true, dataIndex: "srcname", stateId: "srcname" },{ text: _("Destination"), sortable: true, dataIndex: "destname", stateId: "destname" },{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>[PATCH]...
<vulnerable_code> stateful: true, stateId: "42a21c5a-3dc5-11e1-9f73-af7c01c6821f", columns: [{ text: _("Name"), sortable: true, dataIndex: "name", resizable: false, iconCls: Ext.baseCSSPrefix + "grid-cell-booleaniconcolumn-switch" },{ text: _("Shared folder"), sortable: true, dataIndex: "sharedfolde...
<vulnerable_code> "O": _("Offline immediate test") } },{ text: _("Hour"), sortable: true, dataIndex: "hour", stateId: "hour" },{ text: _("Day of month"), sortable: true, dataIndex: "dayofmonth", stateId: "dayofmonth", renderer: OMV.util.Format.arrayRenderer(Date.mapDayOfMonth2Digits) },{ text...
<vulnerable_code> stateful: true, stateId: "bdd0b2ca-1016-11e5-be00-0002b3a176b4", columns: [{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>[PATCH] Improve foreign content handling.<commit_description><fixed_code> stateful: true, stateId: "bdd0b2ca-1016-11e5-be00-0002b3a176b4", colu...
<vulnerable_code> stateful: true, stateId: "af67e357-d388-4b92-a6d1-076f834c1a0f", columns: [{ text: _("Name"), sortable: true, dataIndex: "name", dataIndex: "validto", stateId: "validto" },{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>[PATCH] Improve foreign content handli...
<vulnerable_code> sortable: true, stateId: "scheduling" },{ text: _("User"), sortable: true, dataIndex: "username", stateId: "username" },{ text: _("Command"), sortable: true, dataIndex: "command", stateId: "command" },{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>...
<vulnerable_code> "!icmpv6": _("Not ICMPv6") } },{ text: _("Extra options"), sortable: false, dataIndex: "extraoptions", stateId: "extraoptions" },{ text: _("Comment"), sortable: false, dataIndex: "comment",<commit_title>[PATCH] Improve foreign content handling.<commit_description><fixed_code> "!...
<vulnerable_code> stateId: "wol", width: 45 },{ text: _("Comment"), sortable: true, hidden: true,<commit_title>[PATCH] Improve foreign content handling.<commit_description><fixed_code> stateId: "wol", width: 45 },{ xtype: "textcolumn", text: _("Comment"), sortable: true, hidden: true,
<vulnerable_code> sortable: true, stateId: "scheduling" },{ text: _("Comment"), sortable: true, dataIndex: "comment",<commit_title>[PATCH] Improve foreign content handling.<commit_description><fixed_code> sortable: true, stateId: "scheduling" },{ xtype: "textcolumn", text: _("Comment"), sortable: t...
<vulnerable_code> text += _("Error #") + error.code + ":\n"; if(!Ext.isEmpty(error.trace)) text += error.trace; details.update(OMV.util.Format.whitespace( Ext.util.Format.htmlDecode(text), "pre")); if(details.isVisible()) { details.hide(); c.setText(_("Show details")); ...
<vulnerable_code>// require("js/omv/grid/column/UnixTimestamp.js") // require("js/omv/grid/column/WhiteSpace.js") // require("js/omv/grid/column/Map.js") // require("js/omv/grid/column/ToolTip.js") // require("js/omv/grid/column/NumberRange.js") // require("js/omv/window/MessageBox.js")<commit_title>[PATCH] Improve for...
<vulnerable_code>const http = require('http'); const https = require('https'); const url = require('url'); /** Mounts a proxy at `basePath` such that requests of the form * `${basePath}/http://www.example.com?queryString=value` will be converted to * `http://www.example.com?queryString=value`, preserving any request...
<vulnerable_code>const express = require('express'); const env = require('./env'); const { applyMiddleware } = require('./plugins'); const corsProxy = require('./corsProxy.js'); const app = express(); app.use(morgan('combined')); app.use(express.json()); app.get(`${env.BASE_URL}/healthz`, (_req, res) => res.status(20...
<vulnerable_code> var markdownString = $(this).text(); var contentHtml = marked(markdownString); contentHtml = SG.replaceCodeChar(contentHtml); $(this).html(contentHtml);<commit_title>[PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E5=A4=84=E7=90=86=20xss?=<commit_description><fixed_code> var markdownString = $...
<vulnerable_code> revokeToken, getUserTokens } = require('../../services/tokens') const { canCreateToken } = require('@/modules/core/helpers/token') /** @type {import('@/modules/core/graph/generated/graphql').Resolvers} */ const resolvers = { }, Mutation: { async apiTokenCreate(parent, args, context) { ...
<vulnerable_code> long bodySize = this.contentHeader.getBodySize(); if (bodySize >= this.maxBodyLength) { throw new IllegalStateException(format( "Message body is too large (%d), maximum size is %d", bodySize, this.maxBodyLength ...
<vulnerable_code> int payloadSize = is.readInt(); if (payloadSize >= maxPayloadSize) { throw new IllegalStateException(format( "Frame body is too large (%d), maximum size is %d", payloadSize, maxPayloadSize )); }<commit_title>[PATCH] Tweak e...
<vulnerable_code> int framePayloadSize = (frameBuffer[0] << 24) + (frameBuffer[1] << 16) + (frameBuffer[2] << 8) + readFromBuffer(); if (framePayloadSize >= maxPayloadSize) { throw new IllegalStateException(format( "Frame body is too large (%d),...
<vulnerable_code> tree->_.insert.table = (ST *) t_box_copy_tree ( (caddr_t) view->_.select_stmt.table_exp->_.table_exp.from[0]->_.table_ref.table); _DO_BOX (inx, tree->_.insert.cols) { sqlc_col_to_view_scope (sc, &cols[inx], view, &aliases);<commit_title>[PATCH] Fixed check number of values vs cols ...
<vulnerable_code> return StartsText(UnixIncludeTrailingBackslash(AFolder), Name); } //--------------------------------------------------------------------- void __fastcall TSessionData::DoLoad(THierarchicalStorage * Storage, bool PuttyImport, bool & RewritePassword) { // Make sure we only ever use methods supported ...
<vulnerable_code> Data->Password = BackupData->Password; Data->Ftps = BackupData->Ftps; Data->ApplyRawSettings(SettingsMemo->Lines); } return Result; }<commit_title>[PATCH] Bug 1943: Prevent loading session settings that can lead to<commit_description><fixed_code> Data->Password = BackupData->Passwo...
<vulnerable_code> Matches++; std::unique_ptr<TSessionData> OriginalData(new TSessionData(L"")); OriginalData->CopyDataNoRecrypt(Data); Data->ApplyRawSettings(OptionsStorage.get()); bool Changed = !OriginalData->IsSame(Data, false); if (Changed) ...
<vulnerable_code> std::unique_ptr<TObjectList> DataList(new TObjectList()); try { GetLoginData(AutoStartSession, Params, DataList.get(), DownloadFile, NeedSession, NULL, pufAllowStoredSiteWithProtocol); // GetLoginData now Aborts when session is needed and none is selected ...
<vulnerable_code> class TrailingSlashHandler(web.RequestHandler): """Simple redirect handler that strips trailing slashes This should be the first, highest priority handler. """ def get(self): self.redirect(self.request.uri.rstrip('/')) post = put = get url = sep.joi...
<vulnerable_code>from nose.tools import assert_regex, assert_not_regex from notebook.base.handlers import path_regex # build regexps that tornado uses: path_pat = re.compile('^' + '/x%s' % path_regex + '$') def test_path_regex(): for path in ( '/x', '/y/x/foo', ): assert_not_regex(pat...
<vulnerable_code> { uint8_t tunnel_type, flags; tunnel_type = *(tptr+1); flags = *tptr; tlen = len; ND_TCHECK2(tptr[0], 5); ND_PRINT((ndo, "\n\t Tunnel-type %s (%u), Flags [%s], MPLS Label %u", ...
<vulnerable_code> return folly::none; } TLSMessage msg; // Iterate over the buffers while trying to find // the first non-zero octet. This is much faster than // first iterating and then trimming.<commit_title>[PATCH] Coalesce handshake buffers<commit_description>Summary: It is possible that a peer might ...
<vulnerable_code> } } case ContentType::handshake: { unparsedHandshakeData_.append(std::move(message->fragment)); auto param = decodeHandshakeMessage(unparsedHandshakeData_); if (param) { VLOG(8) << "Received handshake message "<commit_title>[PATCH] Coalesce handshak...
<vulnerable_code> dn_off = le32_to_cpu(authblob->DomainName.BufferOffset); dn_len = le16_to_cpu(authblob->DomainName.Length); if (blob_len < (u64)dn_off + dn_len || blob_len < (u64)nt_off + nt_len) return -EINVAL; #ifdef CONFIG_SMB_INSECURE_SERVER<commit_title>[PATCH] ksmbd: check nt_len to be at least CIFS_ENCPW...
<vulnerable_code><commit_title>[PATCH] Add a fix for CVE-2017-13755, pointed to from<commit_description><fixed_code> $NetBSD: patch-tsk_fs_iso9660__dent.c,v 1.1 2018/08/23 07:47:34 he Exp $ --- tsk/fs/iso9660_dent.c.orig 2014-01-27 03:27:03.000000000 +0000 +++ tsk/fs/iso9660_dent.c @@ -98,6 +98,12 @@ iso9660_proc_dir(...
<vulnerable_code> self.assertAllEqual(self.evaluate(f()), [[3.], [3.]]) class CollectiveOpsV3Test(test.TestCase, parameterized.TestCase): def setUp(self):<commit_title>[PATCH] Fix undefined behavior in CollectiveReduceV2 and others<commit_description>We should not call done after it's moved. PiperOrigin-RevId:...
<vulnerable_code>var SqlTypes = require('./data_types').SqlTypes; var bigInt = require('big-integer'); var { XMLParser, XMLValidator } = require("fast-xml-parser"); var safeEval = require("safe-eval"); var NULL_UPPERCASE = 'NULL'; { try { ret = safeEval("(" + rawColumnValue + ")"); } catch (pa...
<vulnerable_code> case Complex_Selector::REFERENCE: append_mandatory_space(); append_string("/"); c->reference()->perform(this); append_string("/"); append_mandatory_space(); break;<commit_title>[PATCH] Fix possible bug with handling empty reference combinators<commit_...
<vulnerable_code> static void get_nb10(ut8* dbg_data, SCV_NB10_HEADER* res) { const int nb10sz = 16; memcpy (res, dbg_data, nb10sz); res->file_name = (ut8*) strdup ((const char*) dbg_data + nb10sz); } static int get_debug_info(struct PE_(r_bin_pe_obj_t)* bin, PE_(image_debug_directory_entry)* dbg_dir_entry, ut8* db...
<vulnerable_code>// external modules const Sequelize = require('sequelize') const scrypt = require('scrypt-kdf') // core const logger = require('../logger') } if (profile) { profile = { name: profile.displayName || profile.username, photo: User.parsePhotoByProfile(profile), bigger...
<vulnerable_code> status=QuantizeImage(quantize_info,image); quantize_info=DestroyQuantizeInfo(quantize_info); } image->colors=2; image->matte=MagickFalse; break; }<commit_title>[PATCH] https://github.com/ImageMagick/ImageMagick/issues/281<commit_description><fixed_code>...
<vulnerable_code> } msgptr; int msg_len_valid = 0; ND_TCHECK2(*tptr, sizeof(struct olsr_msg4)); if (is_ipv6) { msgptr.v6 = (const struct olsr_msg6 *) tptr; msg_type = msgptr.v6->msg_type; msg_len = EXTRACT_16BITS(msgptr.v6->msg_len); }...
<vulnerable_code> GSWindow *window) { cairo_surface_t *surface; GdkDisplay *display; GdkScreen *screen; int width; int height; gint scale; mate_bg_load_from_preferences (manager->priv->bg); gs_window_set_background_surface (w...
<vulnerable_code>} static void screen_size_changed (GdkScreen *screen, GSWindow *window) { gs_debug ("Got screen size changed signal"); gtk_widget_queue_resize (GTK_WIDGET (window)); } static void gs_window_real_unrealize (GtkWidget *widget) { g_signal_handlers_disconnect_by_func (gtk_window_...
<vulnerable_code> display = gdk_display_get_default (); monitor = gdk_display_get_primary_monitor (display); window = gs_window_new (display, monitor, lock_active); gs_window_set_user_switch_enabled (window, user_switch_enabled); <commit_title>[PATCH] fix more GdkScreen related deprecations<commit_description>This...
<vulnerable_code>const pkg = require('./package.json'); const version = parseFloat(process.version.substr(1)); const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.')); module.exports = function () {<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/...
<vulnerable_code> props.push(t.objectProperty(t.stringLiteral('action'), action)); } if (elt.defaultValue) { const parsedValue = parseDefaultValue(elt, elt.defaultValue, t); if (parsedValue) { props.push(t.objectProperty(t.stringLiteral('default'), parsedValue)); } e...
<vulnerable_code> }); }); it('allow cloud to encode Parse Objects', async () => { const user = new Parse.User(); user.setUsername('username'); user.setPassword('password');<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-community/par...
<vulnerable_code> }); }); it('unsets the _email_verify_token_expires_at and _email_verify_token fields in the User class if email verification is successful', done => { const user = new Parse.User(); let sendEmailOptions;<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [...
<vulnerable_code>const UserController = require('../lib/Controllers/UserController').UserController; const emailAdapter = require('./support/MockEmailAdapter'); describe('UserController', () => { describe('sendVerificationEmail', () => { describe('parseFrameURL not provided', () => { it('uses publicServerU...
<vulnerable_code> this._algorithm = 'aes-256-gcm'; this._encryptionKey = encryptionKey !== undefined ? crypto.createHash('sha256').update(String(encryptionKey)).digest('base64').substr(0, 32) : null; const defaultMongoOptions = { useNewUrlParser: true, } async rotateEncryptio...
<vulnerable_code> if (fieldName === '$_updated_at') { return 'updatedAt'; } return fieldName.substr(1); }; const validateKeys = object => { }; } if (object[fieldName] && schema.fields[fieldName].type === 'Polygon') { let coords = object[fieldName]; coords = coords.substr(2,...
<vulnerable_code> return str; } if (str.endsWith('/')) { str = str.substr(0, str.length - 1); } return str; }<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-community/parse-server/compare/6.2.0...6.2.1) (2023-06-28) ### Bug Fixes * Remote...
<vulnerable_code> } get shouldVerifyEmails() { return this.options.verifyUserEmails; } setEmailVerifyToken(user) { if (this.shouldVerifyEmails) { user._email_verify_token = randomString(25); user.emailVerified = false; if (this.config.emailVerifyTokenValidityDuration) { user....
<vulnerable_code>module.exports = [ { optionKey: 'allowClientClassCreation', changeNewDefault: 'false' }, { optionKey: 'allowExpiredAuthDataToken', changeNewDefault: 'false' }, ];<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-community/parse-server/c...
<vulnerable_code> action: parsers.booleanParser, default: false, }, encryptionKey: { env: 'PARSE_SERVER_ENCRYPTION_KEY', help: 'Key for encrypting your files', action: parsers.objectParser, default: {}, }, serverCloseComplete: { env: 'PARSE_SERVER_SERVER_CLOSE_COMPLETE', help: 'Ca...
<vulnerable_code> * @property {Number} emailVerifyTokenValidityDuration Set the validity duration of the email verification token in seconds after which the token expires. The token is used in the link that is set in the email. After the token expires, the link becomes invalid and a new link has to be sent. If the opti...
<vulnerable_code> /* Max file size for uploads, defaults to 20mb :DEFAULT: 20mb */ maxUploadSize: ?string; /* Set to `true` to require users to verify their email address to complete the sign-up process. <br><br> Default is `false`. :DEFAULT: false */ verifyUserEmails: ?boolean; /* Set to `true` to pre...
<vulnerable_code> .then(() => { return this.validateAuthData(); }) .then(() => { return this.runBeforeSaveTrigger(); }) } }; // The non-third-party parts of User transformation RestWrite.prototype.transformUser = function () { var promise = Promise.resolve(); if (this.className !== '_U...
<vulnerable_code>import _ from 'lodash'; import { logger } from '../logger'; function parseObject(obj) { if (Array.isArray(obj)) { return obj.map(item => { return parseObject(item); return Object.assign(new Date(obj.iso), obj); } else if (obj && obj.__type == 'File') { return Parse.File.fromJSON(...
<vulnerable_code> const userController = config.userController; return userController.resendVerificationEmail(username).then( () => { return this.goToPage(req, pages.emailVerificationSendSuccess); },<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](http...
<vulnerable_code> const userController = config.userController; return userController.resendVerificationEmail(username).then( () => { return Promise.resolve({ status: 302,<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-com...
<vulnerable_code> } } handleVerificationEmailRequest(req) { this._throwOnBadEmailConfig(req); const { email } = req.body; ); } return req.config.database.find('_User', { email: email }).then(results => { if (!results.length || results.length < 1) { throw new Parse.Error(Par...
<vulnerable_code> const base64 = req.body.toString('base64'); const file = new Parse.File(filename, { base64 }, contentType); const { metadata = {}, tags = {} } = req.fileData || {}; if (req.config && req.config.requestKeywordDenylist) { // Scan request data for denied keywords for (const key...
<vulnerable_code> } return false; } } module.exports = Utils;<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-community/parse-server/compare/6.2.0...6.2.1) (2023-06-28) ### Bug Fixes * Remote code execution via MongoDB BSON parser through proto...
<vulnerable_code> }) .then(() => done()); }); }); describe('afterFind hooks', () => {<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-community/parse-server/compare/6.2.0...6.2.1) (2023-06-28) ### Bug Fixes * Remote code execution via Mongo...
<vulnerable_code> it('should only count', async () => { await prepareData(); await parseGraphQLServer.parseGraphQLSchema.schemaCache.clear(); const where = {<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-co...
<vulnerable_code> return Promise.all(promises); }; const restExecute = spyOn(RestQuery.prototype, 'execute').and.callThrough(); let user, auth, getAllRolesSpy; createTestUser()<commit_title>[PATCH 3/9] chore(release): 6.2.1 [skip ci]<commit_description>## [6.2.1](https://github.com/parse-communit...
<vulnerable_code> } const config = Config.get('test'); await Parse.Object.saveAll(objects); const query = new RestQuery( config, auth.master(config), 'Object', { value: { $gt: 2 } }, { limit: 2 } ); const spy = spyOn(query, 'execute').and.callThrough(); const cla...