Monday, 19 April 2010

Commom Sense is Not Common

Why is it called common sense anyway?

A lot of business sense and expertise is common sense. Many excellence programs distill to common sense. ISO 9001 QMS, TPM, 5S, Six Sigma... You name it. An essential and substantial ingredient of all these is common sense.

Most important insights are plain common sense. Or so they see, after you learn it. Like Peter Drucker's insights on business for example.

But Common sense is not commonly present. Most of our life experience is about aquiring this common sense. Why call it common sense if it is not common anyway? Perhaps the 'common' does not mean 'present everywhere', it probably means 'applies universally' to many things.

Wednesday, 1 July 2009

Morning Coffee

If you are using FireFox, Get this Add-on called Morning Coffee.

It lets you open all your favorite sites in multiple tabs one click. You can define which sites to open depending the day of week.

Download here
.

Monday, 16 March 2009

By Bro-in-Law's Site

Please visit another site designed by me: DrGiri.Com. Its for my Bro-in-law, Dr. A Arunagiri MD (Int)

Please visit my new educational Initiative - UStudy.In

During 2008, I launched an initiative - an e-learning portal cum reference site. Students get information regarding their subjects in one place. The content can be edited by any faculty - Something on the lines of Wikipedia.

The site's slogan is The Web's Where You Study.In. Please pay a visit to know more.

Sunday, 25 January 2009

Drupal + FCKEditor + GeSHi Filter

In my site www.ustudy.in, I have drupal 6.9 with FCKEditor working fine. I was trying to configure GeSHi Filter. GeSHi Filter offers source code formatting. If you type the source code in almost any language, GeSHi filter formats the code, color highlighting the syntax, adding line numbers etc.

Problem is FCKEditor converts html entities like >< to & lt; etc., even before GeSHi filter gets its hands on the code. FCKEditor seems not to mess up with just this tags: SCRIPT, <!-- -->, . If I configured GeSHi filter to process SCRIPT tag for coloring code, It works fine. Until some one wants SCRIPT tag itself to appear in the quoted, formatted code!

So I decided to configured the GeSHi Filter to process a fictions tag: <codeformat> and configured FCKEditor to process it as a ProtectedSource. Here is what I added to the fckeditor\fckeditor\fckconfig.js:

FCKConfig.ProtectedSource.Add( /<\codeformat[\s\S]*?<\/codeformat>/gi ) ;

It works fine - the users switch to source view in FCKEditor and add a <codeformat language="c"> c_code++; etc(); </codeformat>. This is properly formatted by GeSHi filter and I can see the colored output.

BUT if I click the edit button to the page again, the instant FCKEditor loads up, it converts the <> to & lt; entities. Why FCKEditor is converting the html entities while a page is reloaded for editing remained a mystery to me. This does not happen when I switch between source and WYSIWYG views or while saving the page.

So I dug deeeeeppp in to the jungle of FCKEditor's Javascript source. My God, what an animal it is! Yuucckkk...

I made the following changes to fckeditor/fckeditor/editor/_source/internals/fcklistslib.js:

// We are not handling ins and del as block elements, for now.
BlockElements : { address:1,blockquote:1,center:1,codeformat:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },

// Elements that accept text nodes, but are not possible to edit in the browser.
NonEditableElements : { button:1,codeformat:1, option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },



Now it works fine! Only problem is, the code block is not visible in Wyswig mode at all. The users have to switch to source view to see it. Ok, atleast, it works.

Tuesday, 25 November 2008

Security Vulnerability In Tally

I noticed this loop hole in Tally Accounting software. Lets suppose you have a configuration that prevents people from modifying backdated vouchers. You have configured a company with Security Control, preventing of Create/Alter Backdated vouchers.

This works fine and your data entry people can not enter any backdated vouchers - or so you think!

Gateway of Tally contains an option Import Data. Its purpose is to import tally vouchers in XML format. And this option does not seem to bother about verifying if the vouchers are backdated etc. In fact, It does not seem to bother about the security control settings itself. It is perfectly possible for a backdated voucher to be imported!

To import a voucher, you need it to be in XML format. No sweat! You can export a voucher from Tally to XML format. So make an entry in current date, export it using the Export button to XML format, edit the date using *******, import it back to tally using the Import Voucher option and viola! You have created a backdated voucher!

I confirmed this with Tallysolutions and they recognized this vulnerability. Is it fixed in Release 3 BETA?

Thursday, 11 September 2008