• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is NSLog secure?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is NSLog secure?


  • Subject: Re: Is NSLog secure?
  • From: "Frank D. Engel, Jr." <email@hidden>
  • Date: Tue, 10 May 2005 11:39:20 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nice, but I think I can do you one better; put this in a header file common to all of the source files where you use NSLog:


#define DEBUG

#ifdef DEBUG
#define MYLog(x) NSLog(x)
#else
#define MYLog(x) /* */
#endif



Now in your code, replace NSLog with MYLog...

When doing your build, simply undefine DEBUG so that the NSLog messages become comments, which compile down to nothing ;-)


On May 9, 2005, at 9:21 PM, Greg wrote:

#define DEBUG


in code somewhere

#ifdef DEBUG
NSLog(@"Some sensitive message");
#endif


Then all you have to do is either put the define in the development build style or just comment out the #define when doing a deployment build.


Greg

On 10/05/2005, at 10:54 AM, Ben Borofka wrote:

I'm writing a program that outputs some sensitive data via NSLog (for debugging) that shouldn't be visible to the user. Is it OK to leave all the places I use NSLog where they are, or should I take them out? Is there anyways the user can grab or sniff what my program is outputting?

I just use NSLog for debugging purposes when I'm running the program in Xcode. It's convenient, so I can see what my program is doing, but if there's anyway someone can get the data that is being output with NSLog, I need to take it out.

Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


- -----------------------------------------------------------
Frank D. Engel, Jr.  <email@hidden>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)


iD8DBQFCgNWo7aqtWrR9cZoRAiVoAJoDqkcda2Qq6uIPBiDTtymDiW2gtgCffuEE
aAdSqJiv0n70167oKik9Q78=
=jonV
-----END PGP SIGNATURE-----



___________________________________________________________
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Is NSLog secure?
      • From: Sunil Vemuri <email@hidden>
References: 
 >Is NSLog secure? (From: Ben Borofka <email@hidden>)
 >Re: Is NSLog secure? (From: Greg <email@hidden>)

  • Prev by Date: Re: Add metadata to my files for Spotlight
  • Next by Date: MDQuery number of criteria limitation ?
  • Previous by thread: Re: Is NSLog secure?
  • Next by thread: Re: Is NSLog secure?
  • Index(es):
    • Date
    • Thread