Questions tagged [security]

Use it for questions related to site security, in particular those focused on protecting a Drupal site from unauthorized access.

Filter by
Sorted by
Tagged with
1
vote
0answers
21 views

Any security issues accessing $_POST and returning values from it in AJAX commands?

Just wondering if there needs to be any sanitization here: /** * Implements hook_ajax_render_alter(). */ function my_module_ajax_render_alter(&$commands) { if (isset($_POST['...
0
votes
1answer
54 views

How can I restore the security of an old site with a sql injection vulnerability which was probably exploited? [closed]

Edit: Sorry, the question was marked as unclear. In a nutshell, there are two questions: Does the code below indeed create an sql injection vector? (It seems clear that the answer is yes, even though ...
0
votes
1answer
49 views

The administrator menu disappeared

I added the following code in my .htaccess file : <IfModule mod_headers.c> Header set Set-Cookie HttpOnly;Secure Header always set X-XSS-Protection "1; mode=block" Header always set X-...
6
votes
3answers
4k views

Prevent Cross-site scripting

One of the security principles is sanitizing strings and variables passed from client to server. In plain PHP there are some functions to prevent XSS (Cross-site Scripting) vulnerabilities: ...
4
votes
1answer
3k views

Prevent SQL injection

One of the security principles is sanitize string and variables passed from client to server; SQL injection is one of the way to hack a website. in plain PHP there are some functions to prevent SQL ...
2
votes
3answers
568 views

How can i get prepared for DRUPAL-PSA-2016-001?

The PSA for tomorrow left me a bit uncomfortable. Quote: The Drupal Security Team urges you to reserve time for module updates at that time because exploits are expected to be developed within ...
0
votes
2answers
431 views

Which Drupal versions are affected by the vulnerabilities in advisory PSA-2016-001?

There is an PSA about the 2016-July-13 Security Advisory of several critical updates: View online: https://www.drupal.org/node/2764899 Advisory ID: DRUPAL-PSA-2016-001 Project: Drupal ...
1
vote
2answers
1k views

How do I redirect to www and https in settings.php?

I want to include code in settings.php which would handle redirects to the www alias and also https. Because it is for a distribution I would prefer not to have hard-coded URLs and I would also ...
0
votes
1answer
28 views

How can I display a page element based upon security?

If I want to hide or show a DOM element, say a button that can show further information because the logged in user is a manager, how can I do that in Drupal 8? Do I need to create separate pages for ...
1
vote
1answer
26 views

I'm using CiviContribute and need CAPTCHA

I'm new to Drupal and CiviCRM. I work mostly with Blackbaud/NetCommunity. I'm operating a website that using CiviContribute for donations. Our Payment Processor is Paypal Payments Pro. I'm trying to ...
1
vote
1answer
281 views

How to apply xss filter on a csv file

I have a CSV file from which I am importing some data. Should I need to apply XSS filter? How do I achieve this? while (!feof($handle)) { $data = fgetcsv($handle); $path[] = $data[0]; $...
2
votes
3answers
1k views

How to remove malicious scripts from admin pages after being hacked?

The site running Drupal 7 was hacked and every administration page, e.g. http://www.anysite.com/en/admin/dashboard contains script tag in head section with malicious src attribute, e.g. <head>...
1
vote
0answers
599 views

Update database/dom after dialog button submitted with jQuery

Clicking a dialog button I want to update Drupal database using jQuery .ajax() function! I want to know if in first place is secure to do so or is another method to handle the synchronous requests? ...
0
votes
1answer
50 views

warning message after uprgraded to drupal 6.38

I upgraded drupal 6.2 to drupal 6.38 to apply the security patch to ignore the vulnerabilities as mentioned in https://www.drupal.org/drupal-6.38-release-notes . But after updating to 6.38 when i ...
2
votes
1answer
50 views

How do I secure pages and related media files?

I would like to password protect Drupal pages (solved) and media files related to these pages (solved, but not optimally). Currently the Drupal pages are secured via Drupal and the media files via ...
1
vote
1answer
726 views

How do I handle third-party API credentials in settings? [closed]

I am building a module that will need to integrate credentials for the 3rd party service in Drupal 8. The module's admin panel should remember the credentials and use them to interact with the service,...
1
vote
0answers
17 views

site hacked: ctolls cercoincontri [duplicate]

one of the web site (in Drupal 7.43) I am looking after (apparently not that well, although updates have always been applied) has been hacked. There's now extra text in the footer pointing to an ...
3
votes
2answers
107 views

How can I ensure I retain access to a Drupal site after handing it over to a client?

Does Drupal have a mechanism which will allow me to keep control over a site after handing it over to a client? If things go wrong with the client relationship, I need to be sure I still have control ...
0
votes
2answers
82 views

Update to Search API 1.18 causes HTML to be displayed as plaintext

A security update to Search API (7.x-1.18) adds new sanitation as a security measure. Great! ..Except it now causes my custom field to be displayed as plaintext instead of HTML. Here is the ...
0
votes
0answers
115 views

How good is the default encryption method provided by the Encrypt module?

I want to encrypt certain field values from webform submissions and will use webform_encrypt module to achieve this. This is dependant on encrypt module. I am interested to know how satisfactory are ...
0
votes
1answer
111 views

Delete cookie just before render

I am trying to hide the fact that I have a Drupal site (as much as possible). The idea is that if a would be hacker (I am not talking about some ninja that could break into the pentagon) looks at ...
0
votes
1answer
31 views

How does Drupal ensures that the one time unique URL used to reset user password does not get transferred away inside the http_referer header?

For example in case the site relies on and loads some external JS (such as jQuery via CDN). Quite technical but any insights are highly appreciated. Thanks.
1
vote
1answer
383 views

What to do for “Login attempt failed for admin.” and “Access denied” to path admin?

In Watchdog, I started seeing several entries like this: Login attempt failed for admin. And access denied 2016/04/04 - 15:06 admin These are generating a fair number of log entries. The IP ...
0
votes
1answer
154 views

How did the ransomware get in? [closed]

A site where the site owner put off having updates done has been compromised with ransomware. This situation brings up a lot of questions. A Google search has not produced any answers. The server is ...
0
votes
1answer
419 views

Permanent Cookie Contains Sensitive Session Information [closed]

I have a cookie question in regards to a security scan (via IBM Rational AppScan) conducted on a drupal(7.43) site. The security scan failed with the following error: (Permanent Cookie Contains ...
0
votes
0answers
13 views

Why settings.php does not redirect to homepage so it betrays that the file is in that exact location even if moved by security reasons? [duplicate]

I have checked that www.example.com/sites/default/settings.php is reachable via web browser, even if it returns an empty page. What is more strange, in Drupal org webpage, http://www.drupal.org/sites/...
0
votes
1answer
25 views

Looking for informaton on Drupal core security process, audits and benchmarking

I'm looking for information on Drupal's security processes, any audits carried out, benchmarking against securty standards, what happens security-wise before a new Drupal release etc... The most ...
2
votes
0answers
33 views

How to handle user 1 with PCI compliance [closed]

PCI compliance states there can be no shared accounts. Typically between developers user 1 is shared and utilized for things that require user 1, but that would violate the PCI rules. Is there a way ...
1
vote
1answer
124 views

Increase security on logon

I am using Logintoboggan module but by chance by playing around with Wireshark packet sniffing tools I can see all login details and passwords when users login/register on my site! Is there a way to ...
2
votes
1answer
105 views

Add Encryption to Images

Is there a way to add encryption to images once they are uploaded on the website and stored on the server?
1
vote
1answer
41 views

Secure file download from other server

This is an unusual one. Let's say I have two web servers A and B. How would I go about making a link to a file from a Drupal website on server A to a file on server B such that the link is secure (the ...
2
votes
1answer
520 views

How can I exclude API keys, passwords, and so on from configuration management?

I am using Drupal 8 and drush cex to commit my configuration to my repository. However, I want to keep passwords and API keys out of the repository. How do I do that? (selectively exclude sensitive ...
2
votes
2answers
100 views

Is this a possible attack on database?

In the logs (Drupal 7), I have seen the next entry (I have edited some compromised info). It seems a failed (only I hope it actually failed) attempt to access the login account. I have tried to ...
0
votes
0answers
17 views

How to check for drupal page routine, no form submit working

On my drupal website, I suddenly can't submit any form successfully. The page appears to reload but does not go anywhere, stays exactly where any form is. Using drush uli, I can get in as admin but ...
4
votes
1answer
773 views

Multiple login attempts from different IP Addresses

My website has been getting about 25 login attempts per hour for the past few days for usernames admin, administrator and our website name. The attacker seems to be using differing IP addresses and ...
8
votes
2answers
384 views

Why is settings.php in the web folder?

In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a ...
2
votes
1answer
48 views

Can I temporarily stop update notifications for one project only? [duplicate]

Is there a way I can tell Drupal not to notify me about a particular version of a module? For example, if it isn't security related and I choose not to update one module but would like to receive ...
-1
votes
1answer
32 views

code change alert/email [closed]

Is there a module to help me receive email for any change in drupal site ? https://www.drupal.org/project/logging_alerts this module help a lot in log in / log out and add content .. but I need to ...
0
votes
1answer
1k views

How to prevent applications from uncovering the technologies used on the website [closed]

Here is a super hard question, probably for the most experienced people: Can we prevent applications from uncovering the technologies we are using. We all know that making sure to keep the core and ...
0
votes
0answers
106 views

code automatically changing on me - iframe not working consistently - IE11 cross-site scripting error

I have created a Basic Page and put code in the body for an iframe so we can connect to our university library publication system. I'm doing this for all our users with publications. I had about 20 ...
4
votes
3answers
4k views

Favicon not loading from https

I have enabled https for my site. All images and files are served with https url, but favicon it is serving from http://example.com/sites/default/files/favicon.ico instead it should show as https://...
0
votes
0answers
26 views

Front page full of invisible spam links [duplicate]

This morning i noticed that wherever i want to click on menu and above menu i have invisible links leading to spam websites. It looks to me that they are hard coded but i have no idea where to delete ...
-1
votes
2answers
113 views

Hardening Drupal server running the Update Manager

We are going to do the hardening on one of our Linux server running SELinux and Drupal 7 with firewall; on the Drupal Update Manager, if we want only to get periodic emails / notifications on modules ...
0
votes
1answer
61 views

SQL injection and lot of database updates are visible [closed]

My Drupal Website is possibly compromised through a SQL injection and lot of database updates are visible. How to avoid further SQL injection?
0
votes
3answers
242 views

Drush error on core update “corrupt (wrong md5 checksum)”

I'm getting this error when I try to update core with Drush: File drupal-7.41.tar.gz is corrupt (wrong md5 checksum). [error] Updating project drupal failed. Attempting to roll back to previously ...
1
vote
1answer
113 views

Using the back button after logging out shows you pages from the authenticated user's session

Using the back button after logging out shows you pages from the authenticated user's session. I found a solution for this, need to set the header like this to fix this issue- drupal_add_http_header(...
8
votes
1answer
774 views

What do blocked IP addresses see?

I have been getting a lot of failed attacks targeting my server in the last few months. I have been using the Drupal IP block to block IPs that where sniffing for vulnerabilities. I would like to know ...
1
vote
2answers
103 views

Is it safe to send the unencoded JSON output?

The mobile app developers wants an api to get a list of articles from our Drupal site. It should have these fields in the output: nid title field_teaser_body The api resonse has to be in JSON format....
0
votes
1answer
460 views

Getting password hashes and salts from Drupal 7

I need to get user accounts' password hashes and salts from a Drupal 7 app, so as to migrate these accounts into Stormpath. Could you please help me to figure out where this data is stored and how to ...
3
votes
1answer
188 views

Is uploading/download executable files harmful in drupal? [closed]

In my site design, I have a field that is designed to hold an executable file (.exe, .bat, etc), for users to upload and download. I took pause as I was typing these extensions into the Allowed file ...