Click here to Skip to main content

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
AnswerRe: Interesting technique used in some Legacy code! PinmemberSuper Lloyd18-Jun-14 21:35 
GeneralRe: Interesting technique used in some Legacy code! PinmemberStefan_Lang20-Jun-14 5:34 
GeneralRe: Interesting technique used in some Legacy code! PinmemberSuper Lloyd20-Jun-14 6:26 
GeneralCodeProject Daily News - The only newsletter I would, deliberately, subscribe to PinprofessionalAdam Tibi11-Jun-14 0:25 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to PinmemberHomerTheGreat11-Jun-14 0:42 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to PinmemberPIEBALDconsult12-Jun-14 4:08 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to PinprotectorOriginalGriff16-Jun-14 6:28 
GeneralEnhanced Password Security PinprofessionalBernhard Hiller10-Jun-14 22:08 
The other day, a customer complained that we - sometimes, but not always - wrote the password of their Hospital Information System (HIS) in our log files in clear text.
Heh? Just another customer telling us bullsh*t!?
Alahs, right he is.
When our application starts, it logs some general information, e.g. hardware, OS, and Environment Variables.
And in the section of the Environment Variables, sometimes there was an entry like
HIS_PWD=CUSTOMERS_HIS_PASSWORD
The customer found then out that it did not happen when he started our application from the start menu or from its desktop item. It only happened when he started it from the HIS (as the doctors normally do: the HIS can provide us with context information like the patient the doctor is working on).
Well, a process inherits the environment from the process it was started from, including all its Environment Variables.
Do you see what happened here?
It's really a great idea to store the clear-text password as an environment variable, it is absolutely safe there.
JokeRe: Enhanced Password Security PinprofessionalKornfeld Eliyahu Peter10-Jun-14 23:17 
GeneralRe: Enhanced Password Security PinprofessionalEddy Vluggen11-Jun-14 1:29 
GeneralRe: Enhanced Password Security PinmemberTrajan McGill11-Jun-14 4:07 
GeneralRe: Enhanced Password Security PinmemberPIEBALDconsult11-Jun-14 13:02 
GeneralRe: Enhanced Password Security [modified] PinmemberPIEBALDconsult11-Jun-14 13:10 
GeneralDateTime.Now vs. GetSystemTime PinprofessionalBernhard Hiller30-May-14 1:17 
GeneralRe: DateTime.Now vs. GetSystemTime PinprotectorPete O'Hanlon30-May-14 2:05 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalBernhard Hiller2-Jun-14 1:30 
GeneralRe: DateTime.Now vs. GetSystemTime PinprotectorPete O'Hanlon2-Jun-14 1:32 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalJörgen Andersson2-Jun-14 22:11 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalBernhard Hiller2-Jun-14 22:35 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalJörgen Andersson2-Jun-14 22:56 
GeneralRe: DateTime.Now vs. GetSystemTime PinmemberBobJanova2-Jun-14 1:51 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalRob Philpott10-Jun-14 6:20 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalEddy Vluggen6-Jun-14 6:11 
GeneralSuccessfully writing to a string literal PinprofessionalIndivara19-May-14 0:44 
GeneralRe: Successfully writing to a string literal PinmemberFreak3019-May-14 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 26 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid