Current Network Fault Caused by Name Conflict

Source: Internet
Author: User
I. PrefaceThe name conflict to be introduced today is not a name conflict within the system, but a name conflict between the system and the browser plug-in. Ii. symptom description:By checking the images uploaded by the O & M personnel to the ticket, we can conclude that JavaScript and CSS cannot be loaded on the user page, but HTML can be parsed successfully. III. The fault analysis process tries to reproduce the fault:(1) HTML can be successfully parsed to eliminate network issues. (2) Check the ngnix access logs of the resource server. Only page requests do not have JS or CSS requests. I guess there is a problem when the page requests loading static resources. (3) but static resources are loaded in the mailbox in a unified way: loadscript and loadcss. If the problem occurs, it should be because all users have problems, not some users. In addition, if there is a problem with the two methods, it is easy for the test colleagues to find that it is impossible to bring a line of generation. (4) start to suspect that the user's browser is infected with a Trojan. Malicious Code is injected into the mailbox page, causing loading of static resources to fail. 4. log on to the user's computer to verify the fault analysis process:(1) install the packet capture tool: httpwatch. Note: In this case, Fiddler is not applicable because fiddler depends on the. NET Framework framework and is not installed. (2) Note that you may not have installed the decompression software. Therefore, if you need to install the software on your computer, you 'd better package it in ZIP format. (3) log on to your mailbox and view the request process for static resources. The requested address is incorrect. Check the source code and find that the loadscript function has no exception. (4) run javascript: Alert (loadscript. tostring (); void (0) in the address bar of your browser. The pop-up method is not defined at all. Conclusion: The user's browser is injected with code, and the execution priority is higher than our own function. 5. Identify malicious plug-ins:(1) Open the plug-in management interface of the user's browser. Generally, the user is an IE browser. Open the management add-on Interface: (2) disable the add-on in turn, refresh the page, and run it again in the address bar of the user's browser: javascript: Alert (loadscript. tostring (); void (0); if an add-on is disabled, we can output our own scripts, which means there is a problem with this plug-in. (3) Finally, locate the problem: the user installed the quickplay browser plug-in, which injects a function with no special name on the browser side: loadscript 6. Preventive measures: When a global function must be defined during encoding, the name must carry the product features. Avoid being overwritten by browser plug-ins of other products.  VII. Conclusion:In fact, quickplay injection is not malicious code, but the root cause of the failure is actually a name conflict. Martin Fowler Refactoring: improving the design of existing codeI have introduced the naming of functions. If you are interested, you can read this book. It is definitely worth it.

Current Network Fault Caused by Name Conflict

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.