Results 1 to 4 of 4

Thread: Singleton use in Production

  1. #1

    Default Singleton use in Production

    Hi all,
    I hope this post is seen given the large amount of spam here as of late.
    I'd like to know why when I run a build, that I can still access singleton properties via their original names in the browser's dev tools - shouldn't these details be obfuscated when minifying etc.? Eg. MyNamespace.SingletonClass.property

    This means that a user can simply open the dev tools and possibly break the app by adjusting these values.

    Please advise, thanks.
    Niall.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    Yes, the class names are not obfuscated.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3

    Default

    Is this something that we can do for the reasons outlined in my original post?

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Once your code hits the browser, there really isn't going to be a good way to protect against the console but instead should rely on security on the server side of things. Even with an obfuscated name, it's only a matter of time before someone finds it. Since Ext JS doesn't run in strict mode (if you use callParent) you can get the callee to see where the call came from but even this is easily hacked around.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Similar Threads

  1. [FIXED] Singleton is broken in production build in ST 2.4
    By taron133 in forum Sencha Cmd
    Replies: 10
    Last Post: 29 Oct 2014, 4:28 AM
  2. Replies: 2
    Last Post: 2 Oct 2014, 1:04 AM
  3. Production built and singleton requirement
    By Tchinkatchuk in forum Ext 5: Q&A
    Replies: 3
    Last Post: 2 Oct 2014, 12:04 AM
  4. Singleton is broken in production build in ST 2.4
    By taron133 in forum Sencha Touch 2.x: Bugs
    Replies: 0
    Last Post: 10 Sep 2014, 2:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •