Update default white list by customer white list
190879
def __set_whitelist(self, whitelist=None):
        
        # add tag's names as key and list of enabled attributes as value for defaults
        self.whitelist = {}
        # tags that removed with contents
        self.sanitizelist = ['script', 'style']
        if isinstance(whitelist, dict) and '*' in whitelist.keys():
            self.isNotPurify = True
            self.whitelist_keys = []
            return
        else:
            self.isNotPurify = False
        self.whitelist.update(whitelist or {})
        self.whitelist_keys = self.whitelist.keys()
937558
public function updateSpammerBlacklist()
    {
        $url = 'https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt';
        $list = Http::sendHttpRequest($url, 30);
        $list = preg_split("/\r\n|\n|\r/", $list);
        if (count($list) < 10) {
            throw new \Exception(sprintf(
                'The spammers list downloaded from %s contains less than 10 entries, considering it a fail',
                $url
            ));
        }

        Option::set(ReferrerSpamFilter::OPTION_STORAGE_NAME, serialize($list));
    }
412263
def update_list(client, list_id, revision, title=None, public=None):
    '''
    
    '''
    if title is not None:
        _check_title_length(title, client.api)
    data = {
            'revision' : revision,
            'title' : title,
            'public' : public,
            }
    data = { key: value for key, value in data.items() if value is not None }
    endpoint = '/'.join([client.api.Endpoints.LISTS, str(list_id)])
    response = client.authenticated_request(endpoint, 'PATCH', data=data)
    return response.json()
807349
def whitelisted_params
      whitelist = params_for_resource(:sign_up)

      whitelist.inject({}) do |coll, key|
        param = omniauth_params[key.to_s]
        coll[key] = param if param
        coll
      end
    end
1340446
def whitelist(ctx, whitelist_account, account):
    
    account = Account(account, blockchain_instance=ctx.blockchain)
    print_tx(account.whitelist(whitelist_account))
1080920
public function setWhitelist($whitelist)
    {
        if (!is_array($whitelist)) {
            $whitelist = preg_split('/\s*,\s*/', $whitelist);
        }
        $this->whitelist = $whitelist;
        return $this;
    }
1175204
function parseList(list, whitelist, context) {
    const parsed = list.split(',');
    parsed.forEach(item => checkWhitelist(item, whitelist, context));
    return parsed;
}
818503
private void updateViewDefaultTemplateWhenGovernanceIsNotInstalled(DbSession dbSession, PermissionTemplateDto template, DefaultTemplates defaultTemplates) {
    String viewDefaultTemplateUuid = defaultTemplates.getApplicationsUuid();
    if (viewDefaultTemplateUuid != null && viewDefaultTemplateUuid.equals(template.getUuid())) {
      defaultTemplates.setApplicationsUuid(null);
      dbClient.organizationDao().setDefaultTemplates(dbSession, template.getOrganizationUuid(), defaultTemplates);
    }
  }
1322059
def update_list(self, list_id, revision, title=None, public=None):
        '''  '''
        return lists_endpoint.update_list(self, list_id, revision, title=title, public=public)
873839
def update(self, ng_template_id, name=NotUpdated, plugin_name=NotUpdated,
               plugin_version=NotUpdated, flavor_id=NotUpdated,
               description=NotUpdated, volumes_per_node=NotUpdated,
               volumes_size=NotUpdated, node_processes=NotUpdated,
               node_configs=NotUpdated, floating_ip_pool=NotUpdated,
               security_groups=NotUpdated, auto_security_group=NotUpdated,
               availability_zone=NotUpdated,
               volumes_availability_zone=NotUpdated, volume_type=NotUpdated,
               image_id=NotUpdated, is_proxy_gateway=NotUpdated,
               volume_local_to_instance=NotUpdated, use_autoconfig=NotUpdated,
               shares=NotUpdated, is_public=NotUpdated,
               is_protected=NotUpdated, volume_mount_prefix=NotUpdated,
               boot_from_volume=NotUpdated,
               boot_volume_type=NotUpdated,
               boot_volume_availability_zone=NotUpdated,
               boot_volume_local_to_instance=NotUpdated):
        """"""

        data = {}
        self._copy_if_updated(
            data, name=name, plugin_name=plugin_name,
            plugin_version=plugin_version, flavor_id=flavor_id,
            description=description, volumes_per_node=volumes_per_node,
            volumes_size=volumes_size, node_processes=node_processes,
            node_configs=node_configs, floating_ip_pool=floating_ip_pool,
            security_groups=security_groups,
            auto_security_group=auto_security_group,
            availability_zone=availability_zone,
            volumes_availability_zone=volumes_availability_zone,
            volume_type=volume_type, image_id=image_id,
            is_proxy_gateway=is_proxy_gateway,
            volume_local_to_instance=volume_local_to_instance,
            use_autoconfig=use_autoconfig, shares=shares,
            is_public=is_public, is_protected=is_protected,
            volume_mount_prefix=volume_mount_prefix,
            boot_from_volume=boot_from_volume,
            boot_volume_type=boot_volume_type,
            boot_volume_availability_zone=boot_volume_availability_zone,
            boot_volume_local_to_instance=boot_volume_local_to_instance
        )

        return self._patch('/node-group-templates/%s' % ng_template_id, data,
                           'node_group_template')
20051
public function defaultSettings()
    {

        //Update the users first and last name
        if (!defined('AD_UPDATE_NAME')) {
            define('AD_UPDATE_NAME', true);
        }

        //Update the users email
        if (!defined('AD_UPDATE_EMAIL')) {
            define('AD_UPDATE_EMAIL', true);
        }

        //Update the users meta data
        if (!defined('AD_UPDATE_META')) {
            define('AD_UPDATE_META', true);
        }

        //Update the users meta data
        if (!defined('AD_META_PREFIX')) {
            define('AD_META_PREFIX', "ad_");
        }

        //Save the password entered by the user (this decreases the security)
        if (!defined('AD_SAVE_PASSWORD')) {
            define('AD_SAVE_PASSWORD', false);
        }

        //Create a random passowrd
        if (!defined('AD_RANDOM_PASSWORD')) {
            define('AD_RANDOM_PASSWORD', true);
        }

        //Bulk import off by default
        if (!defined('AD_BULK_IMPORT')) {
            define('AD_BULK_IMPORT', false);
        }

        //Bulk import default role
        if (!defined('AD_BULK_IMPORT_ROLE')) {
            define('AD_BULK_IMPORT_ROLE', "subscriber");
        }

        //Propagate role
        if (!defined('AD_BULK_IMPORT_PROPAGATE')) {
            define('AD_BULK_IMPORT_PROPAGATE', true);
        }

        //Activate cleaning actions
        if (!defined('AD_CLEANING')) {
            define('AD_CLEANING', true);
        }
    }
926022
async def _set_whitelist(self):
        

        page = self.settings()

        if 'whitelist' in page:
            await self._send_to_messenger_profile(page, {
                'whitelisted_domains': page['whitelist'],
            })

            logger.info('Whitelisted %s for page %s',
                        page['whitelist'],
                        page['page_id'])
258033
def matches_whitelist(self, matches, whitelist):
        '''
        
        '''
        if not whitelist:
            return matches
        ret_matches = {}
        if not isinstance(whitelist, list):
            whitelist = whitelist.split(',')
        for env in matches:
            for sls in matches[env]:
                if sls in whitelist:
                    ret_matches[env] = ret_matches[env] if env in ret_matches else []
                    ret_matches[env].append(sls)
        return ret_matches
473861
def changelist_view(self, request, extra_context=None):
        """"""
        if extra_context is None:
            extra_context = {}
        response = self.adv_filters_handle(request,
                                           extra_context=extra_context)
        if response:
            return response
        return super(AdminAdvancedFiltersMixin, self
                     ).changelist_view(request, extra_context=extra_context)
1148393
public function updateDataProtection($user = null) {
    if (!isset($user)) {
      $user = self::current();
    }

    $this->clientEnabledMethods = self::DEFAULT_CLIENT_ENABLED_METHODS;
    $this->privateData = self::DEFAULT_PRIVATE_DATA;
    $this->whitelistData = self::DEFAULT_WHITELIST_DATA;

    if (Tilmeld::$config['email_usernames']) {
      $this->privateData[] = 'username';
    }

    $isCurrentUser = $user !== null && $this->is($user);
    $isNewUser = !isset($this->guid);

    if ($isCurrentUser) {
      // Users can check to see what abilities they have.
      $this->clientEnabledMethods[] = 'gatekeeper';
      $this->clientEnabledMethods[] = 'changePassword';
      $this->clientEnabledMethods[] = 'logout';
      $this->clientEnabledMethods[] = 'sendEmailVerification';
    }

    if ($user !== null && $user->gatekeeper('tilmeld/admin')) {
      // Users who can edit other users can see most of their data.
      $this->privateData = [
        'password',
        'salt'
      ];
      $this->whitelistData = false;
    } elseif ($isCurrentUser || $isNewUser) {
      // Users can see their own data, and edit some of it.
      $this->whitelistData[] = 'username';
      $this->whitelistData[] = 'avatar';
      if (in_array('name', Tilmeld::$config['user_fields'])) {
        $this->whitelistData[] = 'nameFirst';
        $this->whitelistData[] = 'nameMiddle';
        $this->whitelistData[] = 'nameLast';
        $this->whitelistData[] = 'name';
      }
      if (in_array('email', Tilmeld::$config['user_fields'])) {
        $this->whitelistData[] = 'email';
      }
      if (in_array('phone', Tilmeld::$config['user_fields'])) {
        $this->whitelistData[] = 'phone';
      }
      if (in_array('timezone', Tilmeld::$config['user_fields'])) {
        $this->whitelistData[] = 'timezone';
      }
      if (in_array('address', Tilmeld::$config['user_fields'])) {
        $this->whitelistData[] = 'addressType';
        $this->whitelistData[] = 'addressStreet';
        $this->whitelistData[] = 'addressStreet2';
        $this->whitelistData[] = 'addressCity';
        $this->whitelistData[] = 'addressState';
        $this->whitelistData[] = 'addressZip';
        $this->whitelistData[] = 'addressInternational';
      }
      $this->privateData = [
        'originalEmail',
        'secret',
        'cancelEmailAddress',
        'cancelEmailSecret',
        'emailChangeDate',
        'recoverSecret',
        'recoverSecretTime',
        'password',
        'salt'
      ];
    }
  }
103184
def update(self, cid, session, name=None, pict_url=None, sort_order=None):
        ''''''
        request = TOPRequest('taobao.sellercats.list.update')
        request['cid'] = cid
        if name!=None: request['name'] = name
        if pict_url!=None: request['pict_url'] = pict_url
        if sort_order!=None: request['sort_order'] = sort_order
        self.create(self.execute(request, session)['seller_cat'])
        return self
1302588
public void setWhitelist(java.util.Collection<String> whitelist) {
        if (whitelist == null) {
            this.whitelist = null;
            return;
        }

        this.whitelist = new java.util.ArrayList<String>(whitelist);
    }