Drupal - Security check all site paths by role

I'm writing this in the forlorn hope that someone has already done something similar. I would have posted on drupal.org - but that site is about as user-friendly as a kick in the tomatoes. I don't...

Select only part of a HTML page with jQuery's .post() method?

I have a website that has a voting poll module. A poll controller accepts a vote via a POST request containing the poll ID and response ID as parameters to http://example.com/poll. The site-wide...

Validating row on Datagridview

So, i have this datagridview that displays my whole table, as we all know the primary field cannot be empty or repeated, so i have to do some validating before saving it to the database. i've...

Assign click event after an element was created dynamically

So, instead of having a form in the HTML, I decided to create the form on fly and append it to another element (in my case a <section>, but that will be an option in the near future). I'm using...

Storage choice for login Brute Force countermeasures

I'm currently hardening the security layer of my web appliocation, and I have some questions about the implementation of a login brute force protection : What storage should I use to store the...

Regex giving StackOverflowError on long input string

I am trying to find HTML tags in my code using the regex <(.|\n)+?>. Now I have encountered a string where this regex is giving me a StackOverflowError. For the first time it finds bold part in...

Create R Windows Binary from .tar.gz linux

This is sort of related to a previous post of mine. I have the need to use the bigmemory library on my 32bit Windows PC to do some ugly matrix calculations. Unfortunately, it appears that the...

Django lockdown authentication - Login form not working

I've been investigating methods of locking down an entire page. A colleague drew my attention to django-lockdown. I've installed and and my code looks like this: INSTALLED_APPS +=...

Httpd Access Log shows strange bingbot

i have a server set up in the cloud (ec2) the hosts all of my WordPress sites. i noticed today that the site were getting hit by a hack.. 109.87.118.222 - - [16/Oct/2013:13:10:31 -0400] "POST...

jQuery POST to Django redirecting to GET with no data

I need to post form data to a Django view before the form is submitted. All methods I try fail on the same point. The javascript to make the ajax call is: $('#lockdown-email-form...

How do I setup my CanCanCan permissions correctly?

I am a little confused about how to configure CanCanCan properly. For starters, do I have to add load_and_authorize_resource to every controller resource I want to restrict access to? This is what...

Hover popup code that keeps popup within browser - can ONLY use CSS

I am in quite a bind with my company's website. My company has spent thousands on this website and I am limited to using a non-open-source CMS system. I had to fight (and we paid $1,200) so I...

Memory usage high on server compared to wamp

Lately my site (with 260000 posts, 12000 images, 2,360,987 mysql rows and 450.7 MiB size) is running slow and at times not loading for many mins I installed this Debug bar plugin...

Django & Allauth Login Redirect Issue

For some reason after login the page doesn't redirect to where LOGIN_REDIRECT_URL points but remains on a blank page /accounts/login/ with code 200. So, after login I get a blank page and have to...

Installation of MediaWiki Vagrant - error logs

I try to install MediaWiki Vagrant. Also, I follow this page. I'm on a very new Ubuntu 16.04 installation and I've got this error message : ==> default: Error: /usr/local/bin/multiversion-install...

django format_html not working with string_concat

I am trying to display a two line error message to a user. All attempts I have made have failed and I cannot figure this out, despite searching SO & google. The error I am getting is: Exception...

Restrict Access for FLASK Application deployed to AWS ElasticBeanStalk

I want to restrict access to view my Flask Webpage to only specified AWS users. Say I am doing a project for school, I follow the Aws Tutorial for deploying flask app, however once the app is...

Explicitly defining a group policy to "No One" -- is there a risk?

Many published security standards (including the Microsoft security baselines) contain entries advising a various list-based policies be set to "No One". For example, the CIS audit data for the...

Azure AD/Token/Certificates/SQL - I'm lost

I started a company 3 months ago and there is no software (CRM+other business tasks) that meets my needs. Reluctantly I decided to write my own 2 months ago and it is now 80% complete! I've been...

using nuget cache inside a docker build with .net core when offline

Being in a new area in a lockdown zone, I only have access to badly overpriced sim card data plans right now and I am looking for a way to minimize bandwidth. I have an app that has a regular...

Python: Value Error: 'she' is not in list

EDIT AND ADDENDUM Ok, so as seems to usually be the case in programming, my problem was a small one, pointed out by both ya'll (@Niloct and @Barmar). Basically, I just dropped the whole title case...

Form validation with flash messages in express js

I am trying to validate a form in express js before i post it onto the mongodb which i am using as a backend. My user.js for registration page looks something like this - router.post('/register',...

Show new data to top from firebase in recycler view

i am making a news app in which i am fetching data from firebase to Recycler View, everything is fine but i want to fetch the new data to top in recyclerview how can i do that ? this is how my...

Kotlin using Gson to deserialize local json file

I want to deserialize a local json file using Gson to create a recyclerview. However I get an IllegalStateException on below line. val homeFeed = gson.fromJson(json, HomeFeed::class.java) My...

How to run python code on AWS (EC2/Lambda)

This post is to get basic information/links to understand running Py code on either Lambda or EC2. My code structure is pretty simple: import numpy as np import pandas as pd #load more...

Binary Tree implemented in C using Python Api converts PyObject into Bytes

My PyObject becomes a Bytes object while getting it's value So lately, I am doing a project in C, where I implement a few type of trees, to be able to use them in python, since a C btree...

Python for loop output to a dataframe

I'm new to python and have started to learn programming during the lockdowns of COVID-19. I thought this would be a good dataset to practice with so have built a program that graphs the data...

Powershell .ps1 scripts won't run / don't exist?

I’ve started having the strangest problem with running powershell scripts in the last few weeks… They all display this error message as if the file doesn’t exist? Full console output below...