Bug 4689 - Obfuscate less
Summary: Obfuscate less
Status: CLOSED WONTFIX
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.9.0
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-10 11:44 CEST by Peter Åstrand
Modified: 2018-03-13 13:59 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2013-06-10 11:44:43 CEST
Currently, the obfuscator tries very hard to make the source code "unreadable". For example, it creates very mean variable names:

  oOo0O0o00o = None
  for o00oO0oo0OO in self . headers . getheaders ( "Cookie" ) :
   O0O0OOOOoo , oOooO0 = o00oO0oo0OO . split ( "=" , 1 )
   if O0O0OOOOoo . lower ( ) == "sessionkey" :
    oOo0O0o00o = oOooO0

It's complicated when you need to inspect a traceback or make changes in obfuscated code, both for us and customers. 

I don't think we can stop obfuscating the source code at this point, but we could consider making the obfuscation a little less evil. For example, we could use simple single letter variables names, ie:

  a = None
  for b in self . headers . getheaders ( "Cookie" ) :
   c , d = b . split ( "=" , 1 )
   if b . lower ( ) == "sessionkey" :
    a = b
Comment 1 Peter Åstrand cendio 2013-06-10 11:47:08 CEST
Should probably also use sane indentation level, ie 4.
Comment 2 Pierre Ossman cendio 2018-03-13 13:59:22 CET
We don't see this is a major issue so we don't need to dig down in to specifics of what to change here.

Note You need to log in before you can comment on or make changes to this bug.