<commit_before>require "openssl"
require "digest/sha2"
require "open3"
require "tempfile"

class Users::RegistrationsController < Devise::RegistrationsController
  
  @@OPENSSL_MAGIC = "Salted__"
  @@OPENSSL_DEFAULT_CIPHER = "aes-256-cbc"
  @@OPENPGP_DEFAULT_CIPHER = "AES256"
  @@DEFAULT_MD = OpenSSL::Digest::SHA512
  
  skip_authorization_check
  
  # By default, authentication is required for all actions except new/create/cancel
  
  # before_filter :configure_sign_up_params, only: [:create]
  # before_filter :configure_account_update_params, only: [:update]
  prepend_before_action :authenticate_scope!, only: [
    :edit, :update, :destroy, :changepassword, :changeemail, :resetpoints,
    :advanced, :deletecategory, :security, :export, :appearance, :clipboard,
    :homepage, :diagnostics, :notifications
  ]
  
  before_action :configure_permitted_parameters
  
  def new
    flash.clear
    @agree_terms = params[:agree_terms]
    @tz = params[:tz]
    if request.post?
      build_resource(sign_up_params)<commit_msg>Update new registration flash clear<commit_after>require "openssl"
require "digest/sha2"
require "open3"
require "tempfile"

class Users::RegistrationsController < Devise::RegistrationsController
  
  @@OPENSSL_MAGIC = "Salted__"
  @@OPENSSL_DEFAULT_CIPHER = "aes-256-cbc"
  @@OPENPGP_DEFAULT_CIPHER = "AES256"
  @@DEFAULT_MD = OpenSSL::Digest::SHA512
  
  skip_authorization_check
  
  # By default, authentication is required for all actions except new/create/cancel
  
  # before_filter :configure_sign_up_params, only: [:create]
  # before_filter :configure_account_update_params, only: [:update]
  prepend_before_action :authenticate_scope!, only: [
    :edit, :update, :destroy, :changepassword, :changeemail, :resetpoints,
    :advanced, :deletecategory, :security, :export, :appearance, :clipboard,
    :homepage, :diagnostics, :notifications
  ]
  
  before_action :configure_permitted_parameters
  
  def new
    @agree_terms = params[:agree_terms]
    @tz = params[:tz]
    if request.post?
      flash.clear
      build_resource(sign_up_params)
{'fraction_non_alphanumeric': 0.1053639846743295, 'fraction_numerical': 0.01053639846743295, 'mean_word_length': 5.273273273273273, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '247853', 'n_tokens_mistral': 721, 'n_tokens_neox': 675, 'n_words': 139}