CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • ERROR: You need to send a valid user name and password to execute this file
Pages: [1]

Author Topic: ERROR: You need to send a valid user name and password to execute this file  (Read 2095 times)

pgay@patrickgay.com

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
ERROR: You need to send a valid user name and password to execute this file
August 27, 2007, 04:53:20 pm
Trying to run UpdateMembershipRecords.php and am getting the message above.

The user I am using is the administrator. 

How do I get the admin user added to the Administrator role?

pgay@patrickgay.com

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
Re: ERROR: You need to send a valid user name and password to execute this file
August 27, 2007, 05:21:02 pm
Ok, solved this:

In the UpdateMembershipRecord.php, found the following line:
Code: [Select]
CRM_Utils_System::authenticateScript( true );

and changed it to

Code: [Select]
CRM_Utils_System::authenticateScript( false );

I realize this makes it not authenticate, but frankly, I'd rather have this than passing the userid and password in a url, especially if done in a cronjob.

Patrick



Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ERROR: You need to send a valid user name and password to execute this file
August 27, 2007, 05:29:41 pm

The main problem with not aborting is this allows folks to execute those "cron" php scripts (if u know how to construct the "right" url). I dont think this is secure enough. Hence a new solution for 1.8. We'd like to improve this going forward, so comments / suggestions are welcome and appreciated :)

Note that you can use curl and send the name/pass in a POST request if you dont want it to appear in your access logs. You could also use https if you want to encrypt the contents of the post data

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • ERROR: You need to send a valid user name and password to execute this file

This forum was archived on 2017-11-26.