Cookies secure, or security hole?

I saw a website spoofing itself to be Amazon.com (blatently phishing for credit card information), which displayed information contained in my Amazon.com cookies. Their site was acting as a bridge to Amazon.com, and I presume sniffing for any valuable information they could steal.
I didn't fall for their credit card request, but I was surprised to see my personal information stored in cookies being requested and passed through. Side note: I'm not using Little Snitch yet, but I'll probably get it soon.
Using Safari v2.0.2 (416.13).
Is this a security hole in Safari?
Quad G5   Mac OS X (10.4.4)   Cinema 30 & 23

Well, one example I posted about here a few months ago was CodeTek virtual desktops. I installed it just by dragging it to the Applications folder. No authentication needed.
When I upgraded to 10.4, it stopped working, but I found when I locked the plist file, it prevented codetek from corrupting it and it ran. (The problem has long since been fixed).
However, simply changing the ownership and write permissions on the plist file to root did not prevent the application from writing to the root-owned and write-protected file. Somehow it could do this, even though it had never been granted administrator priviliges.
I checked this behavior with a few other applications, and this was not restricted to Codetek, but rather seems to be a property of the Apple umask or whatever it is called for (non-unix-type) Applications.

Similar Messages

  • Safari don't block cookies / security issue?

    Hi,
    after updating to Lion I noticed a security issue on Safari:  'Block cookies = Always' don't prevent storing of cookies.
    Can anyone confirm this?
    Thanks.

    This security hole seems to be a problem for many users:
    - Never accept cookies button does not work I am still receiving all cookies
    - I have safari 5.05 i always use safari with the cookies set to never except. i see that safari 5.05 keep excepting cookies when i have cookies set to never except. any one has same problem? is it normal for safari to do that? i don't think so.
    - Clicking to never accept cookies does not work.
    Please, try to fix it.

  • MS Office secretly connects to my Mac and scans my activity. How??? Security hole? Exploitable by hackers?

    I have a strange problem. All by itself it's not so serious, but it concerns me that it reveals a security hole which can be exploited by hackers.
    I may be over-reacting, so any reassurance or explanation would be appreciated.
    Here's the situation:
    I have a MacBook Pro running OSX 10.6.5. I also have a new MacBook Air also running 10.6.5. I recently used Migration Assistant to move all my applications from the MacBook Pro to the MacBook Air. The migration worked fine with one very troubling exception.
    One of the applications that got migrated was MS Office 2008 (MSWord, Excel, etc.). When I just had my MacBook Pro, MS Office worked fine. Also, now, if my MacBook Pro is turned off and I'm just using my Air, MS Office again works fine.
    HOWEVER...if I have my MacBook Pro open and running MS Office on it, and then I simultaneously open my Air and try to launch MS Office, I get an error message that says
    "Microsoft Office 2008 for Mac cannot start because Microsoft Office is already in use.
    An office program is being used by Apple Mac. Your installation exceeds the number of installations permitted by the license agreement."
    However, if I then "Quit" MS Office on the Pro, and then try to launch it on the Air, I don't get the error message, and it works as normal. The same thing happens if I switch computers -- if it's running on the Air first, then I can't launch it on the Pro. Basically, only one of the computers can run MS Office at any one time.
    Now, the issue about the MS license agreement is not what concerns me -- I guess the version of MS Office I bought back in 2008 was only supposed to be installed on one single computer, and never migrated to a new computer (I eventually plan to use the Air full time and retire the Pro). I'm probably going to get a newer version of MS Office eventually anyway, and also I almost never use both computers at the same time, so I'm not worried about being unable to use MS Office on both computes simultaneously. No, what worries me is this:
    How does MS Office on one computer even know that my other computer is running and has MS Office open?
    I'm not an expert on networks and sharing and connectivity and all that, so excuse me if I use inaccurate terminology, but...:
    Both computers connect via AirPort to a cable modem and thus share the same wifi hotspot to connect to the internet.
    But as far as I can tell, the two computers are not "connected" to each other. In the System Preferences for both computers, in the "Sharing" panel, all File Sharing is off. Also, none of the sharing boxes are checked.
    Neither computer shows the hard drive of the other on its Desktop. If I wanted to, I could use Finder's "Go" menu, choose "Connect to server," then "Browse," then find the other computer, double-click on it, type in the admin password, and then connect the two computers. But I haven't done that, and MS Office is able to see what the other comoputer is doing, even when they aren't connected in any way (as far as I can tell).
    I find this pretty disturbing. How in the world does the MS Office on one computer even know that the other computer exists? Furthermore, how does it know that the other computer is on and running? And lastly and more importantly, how does it know which programs are running on the other computer?
    One extra detail: in order to try to diagnose this odd behavior, I installed a program called "Little Snitch" which monitors all network activity and notifies the user whenever any malware programs or other sneaky behind-the-scens apps try to send data over your connection without your knowledge. Little Snitch seems to work great but when I test the problem after installing it, Little Snitch did not even detect or report that MS Office was doing any surreptitious network snooping. So whatever MS Office is doing, it's doing it pretty sneakily.
    Here is my worry: Could a hacker somehow exploit this capability of MS Office to monitor activity on my computer without my being aware of it? Or could someone re-adapt this snooping code from MS Office for more nefarious purposes?
    Or am I completely misapprehending the situation somehow?
    Any  reassurance or explanation would be greatly appreciated! Thanks.

    But my question is: How does the software do that?
    It scans the local network for computers trying to "share" software that is only supposed to be licensed for one computer. I can't give you a technical answer, I can just tell you that's what it's doing.
    then what's preventing less ethical coders from deploying similar but more sinister malware with the same capability?
    Nothing. Any vendor of any software, from a one person shareware or freeware app to a company the size of Apple, Microsoft or Adobe could sneak in damaging code. Any company that wants to stay in business though would never allow it.
    In a typical software company (particularly larger ones), you have not only the people who write the code, but also system analysts who review the code looking for flaws or anything else that shouldn't be there.
    Now I have the fear that if I'm using a wifi hotspot in a cafe or wherever, someone else with hacking skills on that same hotspot could basically see what I'm doing on my computer, without my knowledge.
    The software to pry (they hope undetected) into other folks' computers on an open network like that has been around for years. That's why you at least need to have your firewall enabled when using a wifi hotspot.

  • Although I turned off WiFi, set as 'require admin password to turn on and off wifi, when I turn on my MacBook Pro, retina latest model, just got for a month, it turns on wifi automatically, is this a back door or virus or security hole? Thank you

    I have my all networks at 'Off' status in the system panel, never use Bluetooth either, also in the top status bar, and set as 'require admin password to turn on and off WiFi', but when I turn on my MacBookPro 15" retina newest model only one month old, it goes on to WiFi automatically by itself.
    Is this a back door? Security hole?
    The other day, I was taking a break for five minutes, when I came back, the Microsoft outlook is open for setting up an account, I never use outlook, it is there only because it comes with the office package. Also, iTunes was playing music, I don't use iTunes when I'm working. Both were not on before I left for the break.
    What is the problem?

    I have my all networks at 'Off' status in the system panel, never use Bluetooth either, also in the top status bar, and set as 'require admin password to turn on and off WiFi', but when I turn on my MacBookPro 15" retina newest model only one month old, it goes on to WiFi automatically by itself.
    Is this a back door? Security hole?
    The other day, I was taking a break for five minutes, when I came back, the Microsoft outlook is open for setting up an account, I never use outlook, it is there only because it comes with the office package. Also, iTunes was playing music, I don't use iTunes when I'm working. Both were not on before I left for the break.
    What is the problem?

  • Possible Login Screen Security Hole in Lion?

    I think that I have found a glitch in the login screen in Lion that allows a user to hack in to an account without a password! It appears to occur on Macbooks with OS X Lion and here is how to reproduce it:
    Make sure that you account is password-protected and that you require a password 5 seconds after the screen saver/sleep begins. Also, be sure that you have the default "hot corner" settngs and OS X Lion. Lastly, make sure that Finder is on the farthest left icon on your dock and that your screen saver is set to spectrum!
    Close all open windows to see your desktop.
    Now, close you Macbook lid, wait 10 seconds, and open it up. You should see a screen similar to the one shown below, but with your wallpaper & info: 
    Now forcefully (yes, forcefully) restart your Mac by pressing down command, control, and the power button at the same time.
    Wait for your Mac to start up and you should see the same screen you saw (like the image above.)
    Click in the battery/time/wifi signal/etc. area in the top right corner without mousing over the courner.
    Now, mouseover the top right corner of the screen, as it will launch some kind of odd "mission control". From there, ANYONE can control your Mac without seeing your screen. From there, mouse over where you think Finder is on the dock (in the bottom-left corner of the dock) without mousing over and corners of the screen and click it. That SHOULD launch finder on your Mac.
    The login screen should reappear! (Odd, isn't it?)
    Now, mouseover the bottom-left corner and hold esc as soon as the screen turns completely dark. If sucessful, you should see your screensaver show up. While holding esc, move your mouse around towards the bottom-right corner. You should see your cursor over top of the "wheel of doom".
    The screen should flicker and you have hacked in to your account! Funny, isn't it?
    You should see finder over top of your desktop if you located finder correctly in step 7! Cool?
    If you are not sucessful, restart the entire process from step 4 and skip steps 7-8. If it doesn't work out for you after a few attemps, give up! Let's not waste any time on hacking in to an account (unless you are a hacker.)
    Is it just me or can anyone else reproduce this? If it occurs (or not), please list your Macbook's specs and details in a reply.

    jonathan_2005 wrote:
    One of the options in the security panel permits a user to require that a username and password be entered to login once the screen saver locks your account.
    The option is "Require password to wake this computer from sleep or screen saver"
    Although one would assume that the credentials required to wake the computer is the username/password of the account that was being used when the computer went into sleep mode or the screen saver.
    Never assume
    WRONG!!! Anyone with an account on the machine can enter their username/password and wake the computer and voila that user now has control of the machine as the former user. That's right you guessed it HUGE security hole.
    Anyone with a standard user account? Are you quite sure?
    Anyone thinking that they can wake away from their machine and have the screen saver or sleep mode protect their account after a specified period of time is sadly mistaken. Anyone with an account on the machine can enter their own username and password and drop right into your account right where you left off.
    I never think that way. A more secure lock is ensured by using the screen lock feature of the keychain.
    Can you believe this stuff?
    Not sure what stuff you refer to.
    No warning, no release note to tell you of such a poorly designed "security" option.
    Would you believe that anyone can access your computer? Stolen computers are regularly started up without much problem.
    Apple please fix what must have been an oversight or at least tell people about this intentional design BEFORE they find anyone can wake the computer and become you as a user.
    You are writing to other users like yourself here, not Apple.
    I also presume you are new to the Mac world.

  • Can you confirm a security hole in file sharing?

    I have found a very annoying security hole, and I wonder if it is unique to my setup. I have my mini set up with file sharing turned on. It has 5 accounts, one administrator, rest ordinary users. My login for the administrative user on my laptop is the same as on the mini. I have not turned on "Back to my Mac."
    From my laptop I navigate to the mini using either (a) the network panel in finder, (b) the local IP (afp://192.168.0.xxx), or the global IP (afp://64.xxx.xxx.xxx). (My router is set up to forward the appropriate ports to the mini's local IP). I mount the administrative user's home directory under apple file sharing. Now I have full access to these files. I DO NOT SAVE THE PASSWORD IN KEYCHAIN. All this is as it should be.
    Now I eject the administrator disk.
    From now on (until I reboot my laptop), I can mount that same disk without a password!
    Can someone confirm?

    {quote:title=William Lloyd wrote:}This is not a security hole.{quote}
    While I can understand that some may consider Kerberos automagically creating what is essentially a keychain without the users express knowledge or consent a "feature", I definitely consider it a bug and a huge security hole.
    The kerberos ticket should not live longer then the user is actually connected to the machine. Currently, if the user clicks the Disconnect button the Kerberos ticket lives on and any future connections to that server will user that ticket. This is not what users (especially novice to intermediate) would expect. If the user clicks the Disconnect button, then they would expect that they are completely disconnected and any further connections to that server would require authentication. Otherwise they leave their machine wide open, hense the security hole.
    The other thing that makes this so nasty is that if the OS decides not to use kerberos, for whatever reason, the behavior is different. It behaves as the user would expect. Clicking Disconnect does completely disconnect you from the server and any future connections will require authentication. So at a minimum there is a dangerous inconsistency in behavior between when the OS uses Kerberos and when it doesn't. That, at a minimum, should be fixed.

  • IGS: Vulnerability "security hole in level 3"

    Hi!
    We are using SAP ERP 6.0 system with an ingetrated IGS 7.0
    We already changed IGS according to sap note 896400 to the version 7.00 (Patch 15)
    When we run scan on demand we get the following information: 
    A security hole in level 3 was found at server ServerX.
    Vulnerability-Level [highest]: 3
    Vulnerability-Level [highest counted]: 0
    Vulnerability Details
    Date: Sun 10 May 2009  1:26:13 MET
    Vuln: 300803
    Vulnerability: SAPXPG Remote OS Command Execution at sysnr 3
    ToDo: Set up a project to implement access restriction rules to RFC programs
    with the 'secinfo' and 'reginfo' (only available in SAP Netweaver) mechanism
    CertRef: M906071, SAP 30/08
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    Date: Sun 10 May 2009  1:26:17 MET
    Vuln#: 100806
    Vulnerability: External Server Registration is possible at sysnr 3
    ToDo: Secure remote registration of RFC programs (only possible in SAP Basis
    7.00 and later)
    CertRef: M906071
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    Date: Sun 10 May 2009  1:26:17 MET
    Vuln#: 101802
    Vulnerability: IGS HTTP Administration is enabled and this version has
    reported vulnerabilities at sysnr 3
    ToDo: Upgrade to a higher patch level, i.e., for BC-FES-IGS 6.40 Patch Level
    17 or higher and for  BC-FES-IGS 7.00 Patch Level 07 or higher
    CertRef: SAP 34/09
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    End of Vulnerability Details
    Question:
    What we have to do to avoid s security holein level 3?
    Thank you very much!
    regards

    Do you solved tye probllem below. ???  Can you help me.
    I have the same problem.
    What the format of secinfo, reginfo and what value to to profile gw/reg_no_conn_info ??
    Thanks,
    Vulnerability Details
    Date: Sun 10 May 2009 1:26:13 MET
    Vuln: 300803
    Vulnerability: SAPXPG Remote OS Command Execution at sysnr 3
    ToDo: Set up a project to implement access restriction rules to RFC programs
    with the 'secinfo' and 'reginfo' (only available in SAP Netweaver) mechanism
    CertRef: M906071, SAP 30/08
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:

  • IGS: Vulnerability (security hole in level 3 was found)

    Hi!
    We are using SAP ERP 6.0 system with an ingetrated IGS 7.0
    We already changed IGS according to sap note 896400 to the version 7.00 (Patch 15)
    When we run scan on demand we get the following information: 
    A security hole in level 3 was found at server ServerX.
    Vulnerability-Level [highest]: 3
    Vulnerability-Level [highest counted]: 0
    Vulnerability Details
    Date: Sun 10 May 2009  1:26:13 MET
    Vuln: 300803
    Vulnerability: SAPXPG Remote OS Command Execution at sysnr 3
    ToDo: Set up a project to implement access restriction rules to RFC programs
    with the 'secinfo' and 'reginfo' (only available in SAP Netweaver) mechanism
    CertRef: M906071, SAP 30/08
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    Date: Sun 10 May 2009  1:26:17 MET
    Vuln#: 100806
    Vulnerability: External Server Registration is possible at sysnr 3
    ToDo: Secure remote registration of RFC programs (only possible in SAP Basis
    7.00 and later)
    CertRef: M906071
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    Date: Sun 10 May 2009  1:26:17 MET
    Vuln#: 101802
    Vulnerability: IGS HTTP Administration is enabled and this version has
    reported vulnerabilities at sysnr 3
    ToDo: Upgrade to a higher patch level, i.e., for BC-FES-IGS 6.40 Patch Level
    17 or higher and for  BC-FES-IGS 7.00 Patch Level 07 or higher
    CertRef: SAP 34/09
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:
    End of Vulnerability Details
    Question:
    What we have to do to avoid s security holein level 3?
    Thank you very much!
    regards

    Do you solved tye probllem below. ???  Can you help me.
    I have the same problem.
    What the format of secinfo, reginfo and what value to to profile gw/reg_no_conn_info ??
    Thanks,
    Vulnerability Details
    Date: Sun 10 May 2009 1:26:13 MET
    Vuln: 300803
    Vulnerability: SAPXPG Remote OS Command Execution at sysnr 3
    ToDo: Set up a project to implement access restriction rules to RFC programs
    with the 'secinfo' and 'reginfo' (only available in SAP Netweaver) mechanism
    CertRef: M906071, SAP 30/08
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:

  • SSL Security Hole in Safari 3

    I noticed a security hole in Safari 3.2.2 regarding a webpage delivered over SSL when including content from a non-secure location. Ironically, I found this in the developer login for the iPhone developer login.
    The login page, which shows as being on a SSL page with an https delivery is trying to load images, such as http://devimages.apple.com/login/images/hero.png. Notice that it is asking from the non-SSL http site.
    Under the new IE8, it is now warning about this issue and gives option to block or not block the non-secure content.
    Under Safari, it shows without warning.
    The risk of displaying mixed content is that a non-secure webpage or script might be able to access information from the secure content, creating a security hole.
    Running Safari under Vista Business X64
    Lance

    Do you solved tye probllem below. ???  Can you help me.
    I have the same problem.
    What the format of secinfo, reginfo and what value to to profile gw/reg_no_conn_info ??
    Thanks,
    Vulnerability Details
    Date: Sun 10 May 2009 1:26:13 MET
    Vuln: 300803
    Vulnerability: SAPXPG Remote OS Command Execution at sysnr 3
    ToDo: Set up a project to implement access restriction rules to RFC programs
    with the 'secinfo' and 'reginfo' (only available in SAP Netweaver) mechanism
    CertRef: M906071, SAP 30/08
    Tool Reference: proprietary CERT and IPINS scanner
    Comment:
    Counted in: 2009-07
    Monitor:

  • HUGE SECURITY HOLE IN LOGIN FROM SCREEN SAVER

    One of the options in the security panel permits a user to require that a username and password be entered to login once the screen saver locks your account.
    The option is "Require password to wake this computer from sleep or screen saver"
    Although one would assume that the credentials required to wake the computer is the username/password of the account that was being used when the computer went into sleep mode or the screen saver. WRONG!!! Anyone with an account on the machine can enter their username/password and wake the computer and voila that user now has control of the machine as the former user. That's right you guessed it HUGE security hole.
    Anyone thinking that they can wake away from their machine and have the screen saver or sleep mode protect their account after a specified period of time is sadly mistaken. Anyone with an account on the machine can enter their own username and password and drop right into your account right where you left off.
    Can you believe this stuff? No warning, no release note to tell you of such a poorly designed "security" option.
    Apple please fix what must have been an oversight or at least tell people about this intentional design BEFORE they find anyone can wake the computer and become you as a user.
    Thanks,
    JH

    jonathan_2005 wrote:
    One of the options in the security panel permits a user to require that a username and password be entered to login once the screen saver locks your account.
    The option is "Require password to wake this computer from sleep or screen saver"
    Although one would assume that the credentials required to wake the computer is the username/password of the account that was being used when the computer went into sleep mode or the screen saver.
    Never assume
    WRONG!!! Anyone with an account on the machine can enter their username/password and wake the computer and voila that user now has control of the machine as the former user. That's right you guessed it HUGE security hole.
    Anyone with a standard user account? Are you quite sure?
    Anyone thinking that they can wake away from their machine and have the screen saver or sleep mode protect their account after a specified period of time is sadly mistaken. Anyone with an account on the machine can enter their own username and password and drop right into your account right where you left off.
    I never think that way. A more secure lock is ensured by using the screen lock feature of the keychain.
    Can you believe this stuff?
    Not sure what stuff you refer to.
    No warning, no release note to tell you of such a poorly designed "security" option.
    Would you believe that anyone can access your computer? Stolen computers are regularly started up without much problem.
    Apple please fix what must have been an oversight or at least tell people about this intentional design BEFORE they find anyone can wake the computer and become you as a user.
    You are writing to other users like yourself here, not Apple.
    I also presume you are new to the Mac world.

  • Potential Security Hole with 802.1x and Voice VLANs?

    I have been looking at 802.1x and Voice VLANs and I can see what I think is a bit of a security hole.
    If a user has no authentication details to gain access via 802.1x - i.e. they have not been given a User ID or the PC doesn't have a certificate etc. If they attach a PC to a switchport that is configured with a Voice VLAN (or disconnect an IP Phone and plug the PC direct into the switchport) they can easily see via packet sniffing the CDP packets that will contain the Voice VLAN ID. They can then easily create a Tagged Virtual NIC (via the NIC utilities or driver etc) with the Voice VLAN 802.1q Tag. Assuming DHCP is enabled for the Voice VLAN they will get assigned an IP address and have access to the IP network. I appreciate the VLAN can be locked down at the Layer-3 level with ACL's so any 'non-voice related' traffic is blocked but in this scenario the user has sucessfully bypassed 802.1x authentication and gain access to the network?
    Has anyone done any research into this potential security hole?
    Thanks
    Andy

    Thanks for the reply. To be honest we would normally deploy some or all of the measures you list but these don't around the issue of being able to easily bypass having to authenticate via 802.1x.
    As I said I think this is a hole but don't see any solutions at the moment except 802.1x on the IP Phone, although at the moment you can't do this with Voice VLANs?
    Andy

  • RoboHelp 9 - Enabling the cookie secure flag

    Hello All - Have a question about RoboHelp 9 and a security vulnerability.  We discovered a vulnerability in the webhelp output we produce so I am starting here.  The site requires authentication and then passes it into the page, so we believe that RoboHelp uses frames within its framework. The use of frames in authenticated sites is not recommended and as mentioned is a security vulnerability.
    The new version fixes the cross-site scripting vulnerability involving the query string (example.paychex.com/path?XSS) but introduces an equivalent vulnerability with the URL hash tag (example.site.com/path#XSS). Normally, anything after the hash tag is considered a “fragment identifier”, which is a reference to some position in the document. Seems the vulnerability is due to the enabling cookie secure flag.
    Has anyone heard of this?
    Thanks.
    Chris

    hi Chris,
    Adobe RoboHelp team is looking into issue, and will keep the user forum updated of the progress. In the mean time, can you please provide the following information
    Webserver configuration where the help output is published
    Authentication mechanism used by the webserver.
    Sample URL which contains XSS which on click shows some alert message or other vulnerability.
    Thanks
    Praful Jain
    Adobe RoboHelp Team

  • Java 8 not compatible with yosemite...is there a security hole?

    I installed Java8 per Oracles instructions and it is active in my Safari preferences. However, the app pop up still appears, even when I do not have Safari or any other browsers open or running. In fact, even if I reboot the computer and do not have any apps running, within a few minutes of loging in, the pop-up appears. So what is Yosemite looking for? Is there something else running Java in the background that could be a security hole?

    Hi there BallybailShannon,
    You may want to try updating Java using the installer below. 
    Java for OS X 2014-001
    -Griff W. 

  • Any security hole in this programm?

    The code below is a benchmarking harness for sorting algorithms.
    //a driver
    public class TestSort {
         static Object[] testData = {
              0.3, 1.3e-2, 7.9, 3.17
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              Sort bsort = new SimpleSortDouble();
              SortMetrics metrics = bsort.sort(testData);
              System.out.println("Metrics: " + metrics);
              for (int i = 0; i < testData.length; i++)
                   System.out.println("\t" + testData);
    //used for storing statistic data
    public class SortMetrics implements Cloneable {
         public long probeCnt,               //data probes
              compareCnt, //comparing two elements
         swapCnt;     //swapping two elements
         public void init()
              probeCnt = swapCnt = compareCnt = 0;
         public String toString()
              return probeCnt + " probes" + compareCnt + " compares" + swapCnt + " swaps";
         /**overriding clone */
         public Object clone()
              try
                   return super.clone();
              catch (CloneNotSupportedException e)
                   throw new InternalError(e.toString());
    //this is the main framwork
    public abstract class Sort {
         private Object[] values;
         private final SortMetrics curMetrics = new SortMetrics();
         /** Invoked to do the full sort*/
         public final SortMetrics sort(Object[] data)
              values = data;
              curMetrics.init();
              doSort();
              return getMetrics();
         public final SortMetrics getMetrics()
              return (SortMetrics)curMetrics.clone();
         protected final int getDataLength()
              return values.length;
         protected final Object probe(int i)
              curMetrics.probeCnt++;
              return values[i];          
         protected final int compare(int i, int j)
              curMetrics.compareCnt++;
              Object d1 = values[i];
              Object d2 = values[j];
              if (d1 == d2)
                   return 0;
              else
                   return (Double.parseDouble(d1.toString()) > Double.parseDouble(d2.toString()) ? -1 : 1);
         protected final void swap(int i, int j)
              curMetrics.swapCnt++;
              Object tmp = values[i];
              values[i] = values[j];
              values[j] = tmp;
         protected abstract void doSort();
    //used to define a sorting alogrithm
    public class SimpleSortDouble extends Sort {
         @Override
         protected void doSort() {
              // TODO Auto-generated method stub
              for (int i = 0; i < getDataLength(); i++)
                   for (int j = 0; j < getDataLength() - i; j++)
                        if (compare(i, j) > 0)
                             swap(i, j);
    This is a question in �the java programming language(Third Edition) Page102�. I was required to find at least one security hole in �Sort� class that would let a sorting algorithm cheat on its metrics without being caught, assuming that the sorting algorithm author doesn�t get to write method �main�.
    In my naive opinion this framework is well-designed, since I find all the access method that shouldn�t be extended are declared final. It�s really hard for me to figure out any security problem.
    I�m very eager to know the answer, please enlighten me!

    How about this
    Object[] theList = new Object[getDataLength()];
    for(int i=0; i<theList.length; i++){
      theList[i] = probe(i);
    // we now have a local copy of the list.
    // we can do as many comparisions as we like on our local copy,
    // and just mirror the swaps with the sorting algorithm.
    for (int i = 0; i < getDataLength(); i++)
      for (int j = 0; j < getDataLength() - i; j++)
          if (theList.compareTo(theList[j] > 0)     
    swap(i, j);
    Thus we can falsify the number of comparisions we actually do.
    With a bit more effort, you can sort the list, figure out the minimum number of swaps needed to move the original list to the sorted one, and apply those ones.
    The trick is to avoid calling probe, compare and swap as much as possible.By calling probe once for each element, we no longer have to call compare to compare them.

  • Adobe Flash security hole

    As we all now, there's a huge security hole in flash. It's not a question, what to upgrade urgently in 32-bit systems, but the crap company Adobe didn't provide us a 64bit version of this new flash beta. The question is: In 64bit systems wouldn't it be better to package the nspluginwrappered nonsecholed version of flash? Or would it be too difficult, and it would even need a wiki entry? And from about when will be secure packages of flash will be available from arch repositories?

    berbae wrote:It's not clear to me why nspluginwrapper would be needed, because there is in AUR the package lib32-flashplugin-prerelease 10.1.53.64-8, which has less dependencies.
    Cannot that package work on x86_64 arch without nspluginwrapper, if all the needed lib32 libraries are installed ?
    Please can someone give me explanations, thanks.
    Already try that one. In short: it doesn't work.
    Apparently, 64bit Firefox could not recognize 32bit plugin, even if all the necessary lib32 packages are installed, which is why we need nspluginwrapper to act as a "middle man" between Firefox and Flash (someone please correct me if I'm wrong on this).
    Anyway, don't let the huge dependency list scares you, both nspluginwrapper-debian and nspluginwrapper-flash-prerelease combined requires roughly the same dependencies as lib32-flashplugin, it's just that PKGBUILD of nspluginwrapper-debian listed all dependencies, while lib32-flashplugin only list the highest level ones.
    If you don't believe me, try issuing the following command (which is the dependencies of lib32-flashplugin):
    lib32-libxt lib32-gtk2 lib32-nss lib32-curl
    and take note that it pulls in roughly the same number of packages that nspluginwrapper-debian package requires.
    Last edited by zodmaner (2010-06-14 11:31:44)

Maybe you are looking for

  • Large binary data readout from scope

    Hi , I would like to know how I can readout a large amount of data, 10 MSamples for a Scope trace of 10 us/div and display it on VI. I am using direct SCPI commands instead drivers, due to the speed I need. After manually configuring the Scope, I run

  • Transport request from development system to testing system

    Hi, I have collected necessary objects in (development) the transport request except 0DUNN_AREA infoObject .Because info object  0COMP_CODE is compounded with Info object 0DUNN_AREA and 0COMP_CODE is in revised version in development system (But avai

  • Problem using Priority Moments in Currys

    I tried to use the Priority Moments app in Currys today to buy an iPad. The offer is for £30 off a spend of £400 or more. The Terms & Conditions state that the offer excludes iPhones but makes no mention of other Apple products. The code failed as th

  • Notification and Network Preferences won't save in Yosemite

    When I change my notification centre to 'Sort Manually', sort it manually, and change the banners to my liking, the settings hold until I reboot. The same is true when ordering my preferred networks in Network settings. Any way to fix this?

  • Mac book pro won't accept my password! Help!

    My mac book pro is saying im entering the wrong password when I log on to my user. My uncle randomly entered the password a million times and it worked that is how im typing this but i don't want my laptop to sleep and not be able to log on. I go to