A process escape prevention control method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202411741894.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2044-11-29
AI Technical Summary
例如,某业务可以分为1,2,...,k,k+1,...,n等多步交互流程最终完成该业务流程,以k+1为步例,当交易前k步需要做一些校验步骤才可以到达k+1时,如果客户通过浏览器或其他工具直接跳过前k步提交第k+1请求,而如果服务端没有对前k步校验是否完成做再次检查,则该业务就存在流程绕过的风险,即发生交易流程逃逸,此时会导致交易风险
[0037]As can be seen from the above technical solution, this application discloses a method, apparatus, electronic device, and storage medium for preventing process escape. The method and apparatus are applied to an electronic device, specifically responding to a user's current access request sent by the client, determining whether a preceding access request exists; if no preceding access request exists, directly executing the operation logic corresponding to the current access request; if a preceding access request exists, executing subsequent operations based on whether the preceding access request supports the current access request. This solution can prevent unauthorized current access requests from running directly, thereby preventing transaction process escape and avoiding transaction risks.
Smart Images

Figure CN119544350B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cybersecurity technology, and more specifically, to a method, apparatus, electronic device, and storage medium for preventing process escape control. Background Technology
[0002] In the interaction process between the client and the server, if a step requires a prerequisite step as a condition for its execution, and the step is executed before the prerequisite step is completed or executed, this is called transaction process escape. For example, a business process can be divided into multiple interaction steps such as 1, 2, ..., k, k+1, ..., n to complete the business process. Taking k+1 as an example, if the first k steps of the transaction require some verification steps to reach k+1, and the client directly skips the first k steps and submits the k+1 request through a browser or other tools, and if the server does not re-check whether the verification of the first k steps has been completed, then the business process is at risk of bypassing the process, that is, transaction process escape occurs, which leads to transaction risks. Summary of the Invention
[0003] In view of this, this application provides a process escape prevention control method, apparatus, electronic device and storage medium to prevent process escape from occurring in the transaction process, thereby avoiding transaction risks.
[0004] To achieve the above objectives, the following solution is proposed:
[0005] A process escape prevention control method, applied to electronic devices, the process escape prevention control method includes the following steps:
[0006] In response to the current access request sent by the user based on the client, determine whether the current access request has a preceding access request;
[0007] If the preceding access request does not exist, the operation logic corresponding to the current access request is executed directly;
[0008] If the preceding access request exists, then subsequent operations are performed based on whether the preceding access request supports the current access request.
[0009] Optionally, if no prior access request exists, the operation logic corresponding to the current access request is executed directly, including the following steps:
[0010] Execute the corresponding operation logic;
[0011] The cache supports the set of requests for the corresponding operation logic.
[0012] Optionally, if the preceding access request exists, then performing subsequent operations based on whether the preceding access request supports the current access request includes the following steps:
[0013] Determine whether the current access request is included in the request set supported by the preceding access request;
[0014] If the request set does not include the current access request, an error will be reported and the process will exit.
[0015] If the request set includes the current access request, then the operation logic corresponding to the current access request is executed.
[0016] Optional, the following steps may also be included:
[0017] In response to the current access request, generate and cache a list of valid AJAX requests that can be submitted on the returned page of the current access request, and generate a token for each AJAX request in the AJAX list, and all tokens constitute a token list;
[0018] Upon receiving a subsequent AJAX request, if the subsequent AJAX request is included in the list of valid AJAX requests and the token of the subsequent AJAX request is included in the list of tokens, then the subsequent AJAX request is executed; if the subsequent AJAX request is not included in the list of valid AJAX requests, or the token of the subsequent AJAX request is not included in the list of tokens, or the subsequent AJAX request does not carry a token, then the subsequent AJAX request is rejected.
[0019] A process escape prevention control device is applied to electronic equipment, the process escape prevention control device comprising:
[0020] The judgment execution module is configured to respond to the current access request sent by the user based on the client and determine whether the current access request has a preceding access request;
[0021] The first control module is configured to directly execute the operation logic corresponding to the current access request if the preceding access request does not exist.
[0022] The second control module is configured to perform subsequent operations based on whether the preceding access request supports the current access request if the preceding access request exists.
[0023] Optionally, the first control module includes:
[0024] The control execution unit is configured to execute the corresponding operation logic;
[0025] The cache execution unit is configured to cache the set of requests supported by the corresponding operation logic.
[0026] Optionally, the second control module includes:
[0027] The request determination unit is configured to determine whether the current access request is included in the request set supported by the preceding access request;
[0028] The first execution unit is configured to exit by reporting an error if the request set does not include the current access request;
[0029] The second execution unit is configured to execute the operation logic corresponding to the current access request if the request set includes the current access request.
[0030] Optional, also includes:
[0031] The access processing module is configured to respond to the current access request, generate and cache a list of valid AJAX requests that can be submitted on the returned page of the current access request, and generate a token for each AJAX request in the AJAX list, with all tokens forming a token list;
[0032] The conflict control module is configured to, upon receiving a subsequent AJAX request, execute the subsequent AJAX request if it is included in the valid AJAX list and the token of the subsequent AJAX request is included in the token list; otherwise, refuse to execute the subsequent AJAX request if it is not included in the valid AJAX list, or the token of the subsequent AJAX request is not included in the token list, or the subsequent AJAX request does not carry a token.
[0033] An electronic device includes at least one processor and a memory connected to the processor, wherein:
[0034] The memory is used to store computer programs or instructions;
[0035] The processor is used to execute the computer program or instructions to enable the electronic device to implement the process escape prevention control method as described above.
[0036] A computer-readable storage medium is applied to an electronic device, the storage medium carrying one or more computer programs that can be executed by the electronic device to enable the electronic device to implement the process escape prevention control method as described above.
[0037] As can be seen from the above technical solution, this application discloses a method, apparatus, electronic device, and storage medium for preventing process escape. The method and apparatus are applied to an electronic device, specifically responding to a user's current access request sent by the client, determining whether a preceding access request exists; if no preceding access request exists, directly executing the operation logic corresponding to the current access request; if a preceding access request exists, executing subsequent operations based on whether the preceding access request supports the current access request. This solution can prevent unauthorized current access requests from running directly, thereby preventing transaction process escape and avoiding transaction risks. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of an anti-process escape control method according to an embodiment of this application;
[0040] Figure 2 This is a schematic diagram illustrating the execution of an access request according to an embodiment of this application;
[0041] Figure 3 This is a schematic diagram illustrating another way of executing an access request according to an embodiment of this application;
[0042] Figure 4 This is a schematic diagram illustrating another instance of executing an access request according to an embodiment of this application;
[0043] Figure 5 This is a schematic diagram illustrating another instance of executing an access request according to an embodiment of this application;
[0044] Figure 6 This is a schematic diagram illustrating another instance of executing an access request according to an embodiment of this application;
[0045] Figure 7 This is a schematic diagram illustrating another instance of executing an access request according to an embodiment of this application;
[0046] Figure 8 This is a flowchart of another process escape prevention control method according to an embodiment of this application;
[0047] Figure 9 This is a schematic diagram illustrating another instance of executing an access request according to an embodiment of this application;
[0048] Figure 10This is a block diagram of a process escape prevention control device according to an embodiment of this application;
[0049] Figure 11 This is a block diagram of another process escape prevention control device according to an embodiment of this application;
[0050] Figure 12 This is a block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0052] This invention designs four feature lists for each transaction state: a list of current request transaction codes (URL), a list of non-redirecting AJAX requests that the destination page can initiate (List1), a list of redirecting requests that the destination page can initiate (List2), and a list of current cached parameters (Map2). The list of current request transaction codes stores the transaction codes for the current request; the list of AJAX requests (List1) stores the transaction codes for AJAX transactions that will be initiated on the page returned to the client by the URL. These AJAX requests can modify cached data information; AJAX requests not in the list will be rejected by the server; the list of redirecting requests (List2) stores currently executable requests that can change the current state. These requests can be AJAX or non-AJAX, and after execution, the state is updated to K+1; the list of current cached parameters (Map2) stores the information (key-value pairs) that needs to be cached. Based on the above settings, this application proposes the following embodiments.
[0053] Figure 1 This is a flowchart of a process escape prevention control method according to an embodiment of this application.
[0054] like Figure 1 As shown, the process escape prevention control method provided in this embodiment is applied to an electronic device, which can be understood as a computer, server, or cloud platform with data computing and information processing capabilities. The process escape prevention control method includes the following steps:
[0055] S1. Respond to the current access request sent by the user based on the client and determine whether there is a preceding access request.
[0056] When a user sends a current access request to the server from the client, it determines whether the current access request has any prerequisite access requests. Prerequisite access requests refer to essential conditions that pre-exist for the current access request. These prerequisite access requests can be understood as preceding steps; that is, the legitimate execution of the current access request depends on these preceding steps. The result of this determination serves as the basis for deciding whether to execute the request.
[0057] S2. If there is no preceding access request, the operation logic corresponding to the current access request will be executed directly.
[0058] In other words, if, after evaluation, the user's current access request does not have a preceding access request, the operation logic corresponding to the current access request is executed directly. For example... Figure 2 As shown, this current access request is an initial node request, which does not require a preceding access request. For example, clicking a menu item directly will generate a new state, at which point the original state and cache need to be cleared to generate a new initial state; or as... Figure 3 The request itself does not modify the system state, nor does it modify the cached request, such as the following non-cached query request.
[0059] If there is no preceding access request for the current access request, the operation logic corresponding to the current access request will be executed.
[0060] At the same time, the cache supports the set of requests corresponding to the operation logic.
[0061] S3. If there is a preceding access request, then perform subsequent operations based on whether the preceding access request supports the current access request.
[0062] In other words, if, after evaluation, the user's current access request has a preceding access request, then subsequent operations are executed based on whether the preceding access request supports the current access request. Specifically, this is achieved through the following steps:
[0063] First, determine whether the current access request is included in the request set supported by the preceding access request; the request set here refers to the set of subsequent access requests that can only be supported when the preceding access request is executed, which can be understood as a request whitelist.
[0064] If the request set does not include the current access request, an error will be raised and the process will exit. Figure 4 As shown. This indicates that the execution of the current access request must be based on the execution of the preceding access request; otherwise, it is illegal and will cause the process to escape, thus requiring an exit. To draw the user's or system's attention, an error message can be added at this point.
[0065] If the request set includes the current access request, then the operation logic corresponding to the current access request is executed. This indicates within the access request that the current access request is permitted, such as... Figure 5 As shown. Furthermore, after the current access request is completed, the current state K is updated to K+1.
[0066] As can be seen from the above technical solution, this embodiment provides a method for preventing process escape. This method is applied to electronic devices, specifically responding to a user's current access request sent by the client and determining whether a preceding access request exists. If no preceding access request exists, the operation logic corresponding to the current access request is directly executed. If a preceding access request exists, subsequent operations are executed based on whether the preceding access request supports the current access request. This solution prevents disallowed current access requests from running directly, thereby preventing transaction process escape and avoiding transaction risks.
[0067] During the actual execution of the transaction process, when page A initiates an AJAX request, this AJAX request will cache some data on the server. When the AJAX request is asynchronous, the user can click on other menu entries to initiate another request B to enter another page. If there is no conflict, the specific details are as follows: Figure 6 As shown. If B also needs to cache some content, the execution order of cache modification operations performed by A and B on the server side is uncontrollable. It's even possible that B's cached or stored state will be cleared by A, such as... Figure 7 As shown. Based on this, this application also includes the following steps, such as... Figure 8 As shown.
[0068] S4. Respond to the current access request, generate and cache the list of valid AJAX requests that can be submitted and the corresponding token list on the return page of the current access request.
[0069] Specifically, after generating the AJAX list, a token is generated for each AJAX request, and all tokens constitute the token list. This token contains the URL of request K and a random number, which can identify that it was initiated from request K. The token list is stored on the server and also returned to the page.
[0070] S5. Upon receiving a subsequent AJAX request, execute the subsequent AJAX request based on the valid AJAX list and the token.
[0071] like Figure 9As shown, when a subsequent AJAX request is received, if the subsequent AJAX request is included in the valid AJAX list and the token of the subsequent AJAX request is included in the token list, then the subsequent AJAX request is executed; if the subsequent AJAX request is not included in the valid AJAX list, or the token of the subsequent AJAX request is not included in the token list, or the subsequent AJAX request does not carry a token, then the subsequent AJAX request is rejected.
[0072] This prevents two problems: 1. If an AJAX request A is submitted on the page following a previous request K, and the page clicks on a new page K' before the previous request returns, a synchronous request arrives on page HB, and a new asynchronous request B is initiated on that page. The execution order of A and B on the server side is uncontrollable. Normally, they are executed in the order the client clicks, but if A executes later, B's cache operations might be mistakenly refreshed by A, which is inconsistent with the client's expectations and creates operational risks. 2. If page HB also invokes an A, the preceding A request might interfere with subsequent A requests invoked by HB, and may also be inconsistent with expectations. The above solution can identify the legitimacy of AJAX requests and effectively prevent the cache from being mistakenly updated.
[0073] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0074] Although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous.
[0075] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0076] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer.
[0077] Figure 10 This is a block diagram of a process escape prevention control device according to an embodiment of this application.
[0078] like Figure 10 As shown, the process escape prevention control device provided in this embodiment is applied to an electronic device, which can be understood as a computer, server or cloud platform with data computing and information processing capabilities. The process escape prevention control device includes a judgment execution module 10, a first control module 20 and a second control module 30.
[0079] The judgment and execution module is used to respond to the current access request sent by the user based on the client and to determine whether the current access request has a preceding access request.
[0080] When a user sends a current access request to the server from the client, it determines whether the current access request has any prerequisite access requests. Prerequisite access requests refer to essential conditions that pre-exist for the current access request. These prerequisite access requests can be understood as preceding steps; that is, the legitimate execution of the current access request depends on these preceding steps. The result of this determination serves as the basis for deciding whether to execute the request.
[0081] The first control module is used to directly execute the operation logic corresponding to the current access request if there is no preceding access request.
[0082] In other words, if, after evaluation, the user's current access request does not have a preceding access request, the operation logic corresponding to the current access request is executed directly. For example... Figure 2 As shown, this current access request is an initial node request, which does not require a preceding access request. For example, clicking a menu item directly will generate a new state, at which point the original state and cache need to be cleared to generate a new initial state; or as... Figure 3The module itself does not modify the system state, nor does it modify cached requests, such as non-cached query requests. This module includes a control execution unit and a cache execution unit.
[0083] The control execution unit is used to execute the operation logic corresponding to the current access request if there is no preceding access request for the current access request.
[0084] The cache execution unit is used to cache the set of requests supported by the corresponding operation logic.
[0085] The second control module is used to perform subsequent operations based on whether the current access request supports the previous access request if a previous access request exists.
[0086] In other words, if, after assessment, the user's current access request has a preceding access request, then subsequent operations are executed based on whether the preceding access request supports the current access request. Specifically, this module includes a request assessment unit, a first execution unit, and a second execution unit.
[0087] The request determination unit is used to determine whether the current access request is included in the request set supported by the preceding access request. Here, the request set refers to the set of subsequent access requests that can only be supported when the preceding access request is executed, which can be understood as a request whitelist.
[0088] The first execution unit is used to exit if the request set does not include the current access request, such as... Figure 4 As shown. This indicates that the execution of the current access request must be based on the execution of the preceding access request; otherwise, it is illegal and will cause the process to escape, thus requiring an exit. To draw the user's or system's attention, an error message can be added at this point.
[0089] The second execution unit is used to execute the operation logic corresponding to the current access request if the request set contains the current access request. It indicates within the access request that the current access request is allowed, such as... Figure 5 As shown. Furthermore, after the current access request is completed, the current state K is updated to K+1.
[0090] As can be seen from the above technical solution, this embodiment provides a process escape prevention control device. This device is applied to electronic devices and specifically responds to a current access request sent by a user based on a client, determining whether there is a preceding access request. If there is no preceding access request, the operation logic corresponding to the current access request is directly executed. If there is a preceding access request, subsequent operations are executed based on whether the preceding access request supports the current access request. This solution can prevent unauthorized current access requests from running directly, thereby preventing transaction process escape and avoiding transaction risks.
[0091] During the actual execution of the transaction process, when page A initiates an AJAX request, this AJAX request will cache some data on the server. When the AJAX request is asynchronous, the user can click on other menu entries to initiate another request B to enter another page. If there is no conflict, the specific details are as follows: Figure 6 As shown. If B also needs to cache some content, the execution order of cache modification operations performed by A and B on the server side is uncontrollable. It's even possible that B's cached or stored state will be cleared by A, such as... Figure 7 As shown. Based on this, this application also includes an access processing module 40 and a conflict control module 50, as follows: Figure 11 As shown.
[0092] The access processing module is used to respond to the current access request, generate and cache the list of valid AJAX requests that can be submitted and the corresponding token list on the return page of the current access request.
[0093] Specifically, after generating the AJAX list, a token is generated for each AJAX request, and all tokens constitute the token list. This token contains the URL of request K and a random number, which can identify that it was initiated from request K. The token list is stored on the server and also returned to the page.
[0094] The conflict control module is used to execute subsequent AJAX requests based on the valid AJAX list and token when they are received.
[0095] like Figure 9 As shown, when a subsequent AJAX request is received, if the subsequent AJAX request is included in the valid AJAX list and the token of the subsequent AJAX request is included in the token list, then the subsequent AJAX request is executed; if the subsequent AJAX request is not included in the valid AJAX list, or the token of the subsequent AJAX request is not included in the token list, or the subsequent AJAX request does not carry a token, then the subsequent AJAX request is rejected.
[0096] This prevents two problems: 1. If an AJAX request A is submitted on the page following a previous request K, and the page clicks on a new page K' before the previous request returns, a synchronous request arrives on page HB, and a new asynchronous request B is initiated on that page. The execution order of A and B on the server side is uncontrollable. Normally, they are executed in the order the client clicks, but if A executes later, B's cache operations might be mistakenly refreshed by A, which is inconsistent with the client's expectations and creates operational risks. 2. If page HB also invokes an A, the preceding A request might interfere with subsequent A requests invoked by HB, and may also be inconsistent with expectations. The above solution can identify the legitimacy of AJAX requests and effectively prevent the cache from being mistakenly updated.
[0097] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0098] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0099] Figure 12 This is a block diagram of an electronic device according to an embodiment of this application.
[0100] The following is for reference. Figure 12 This document illustrates a structural diagram suitable for implementing the electronic device in the embodiments of this disclosure. The terminal device in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. This electronic device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this disclosure.
[0101] The electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from an input device 606 into a random access memory (RAM) 603. The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0102] Typically, the following devices can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various devices are shown in the figures, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0103] This embodiment also provides an embodiment of a computer-readable storage medium.
[0104] The aforementioned computer-readable storage medium is applied to an electronic device and carries one or more computer programs. When these programs are executed by the electronic device, the device responds to a current access request sent by a user from a client, determining whether a prerequisite access request exists. If no prerequisite access request exists, the operation logic corresponding to the current access request is executed directly. If a prerequisite access request exists, subsequent operations are performed based on whether the prerequisite access request supports the current access request. This solution prevents disallowed current access requests from running directly, thereby preventing transaction process escape and avoiding transaction risks.
[0105] It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0106] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0107] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0108] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0109] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0110] The technical solution provided by the present invention has been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A process escape prevention control method, applied to electronic equipment, characterized in that, The process escape prevention control method includes the following steps: In response to the current access request sent by the user based on the client, determine whether the current access request has a preceding access request; If the preceding access request does not exist, the operation logic corresponding to the current access request is executed directly; If the preceding access request exists, then perform subsequent operations based on whether the preceding access request supports the current access request; The method further includes the following steps: In response to the current access request, generate and cache a list of valid AJAX requests that can be submitted on the return page of the current access request, and generate a token for each AJAX request in the AJAX list. All tokens constitute a token list. The token contains the URL of the current access request and a random number to identify that the AJAX request was initiated from the current access request and to distinguish multiple asynchronous requests from different pages that are used to perform cache modifications. Upon receiving a subsequent AJAX request, if the subsequent AJAX request is included in the list of valid AJAX requests and the token of the subsequent AJAX request is included in the list of tokens, then the subsequent AJAX request is executed; if the subsequent AJAX request is not included in the list of valid AJAX requests, or the token of the subsequent AJAX request is not included in the list of tokens, or the subsequent AJAX request does not carry a token, then the subsequent AJAX request is rejected.
2. The process escape prevention control method as described in claim 1, characterized in that, If no prior access request exists, the operation logic corresponding to the current access request is executed directly, including the following steps: Execute the corresponding operation logic; The cache supports the set of requests for the corresponding operation logic.
3. The process escape prevention control method as described in claim 1, characterized in that, If the preceding access request exists, the subsequent operation is performed based on whether the preceding access request supports the current access request, including the following steps: Determine whether the current access request is included in the request set supported by the preceding access request; If the request set does not include the current access request, an error will be reported and the process will exit. If the request set includes the current access request, then the operation logic corresponding to the current access request is executed.
4. A process escape prevention control device, applied to electronic equipment, characterized in that, The process escape prevention control device includes: The judgment execution module is configured to respond to the current access request sent by the user based on the client and determine whether the current access request has a preceding access request; The first control module is configured to directly execute the operation logic corresponding to the current access request if the preceding access request does not exist. The second control module is configured to perform subsequent operations based on whether the preceding access request supports the current access request if the preceding access request exists. The access processing module is configured to respond to the current access request, generate and cache a list of valid AJAX requests that can be submitted on the returned page of the current access request, and generate a token for each AJAX request in the AJAX list, with all tokens constituting a token list; the token contains information for identifying the current access request to distinguish multiple asynchronous requests from different pages for modifying cached data; The conflict control module is configured to, upon receiving a subsequent AJAX request, execute the subsequent AJAX request if it is included in the valid AJAX list and the token of the subsequent AJAX request is included in the token list; otherwise, refuse to execute the subsequent AJAX request if it is not included in the valid AJAX list, or the token of the subsequent AJAX request is not included in the token list, or the subsequent AJAX request does not carry a token.
5. The process escape prevention control device as described in claim 4, characterized in that, The first control module includes: The control execution unit is configured to execute the corresponding operation logic; The cache execution unit is configured to cache the set of requests supported by the corresponding operation logic.
6. The process escape prevention control device as described in claim 4, characterized in that, The second control module includes: The request determination unit is configured to determine whether the current access request is included in the request set supported by the preceding access request; The first execution unit is configured to exit by reporting an error if the request set does not include the current access request; The second execution unit is configured to execute the operation logic corresponding to the current access request if the request set includes the current access request.
7. An electronic device, characterized in that, The electronic device includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs or instructions; The processor is used to execute the computer program or instructions to enable the electronic device to implement the process escape prevention control method as described in any one of claims 1 to 3.
8. A computer-readable storage medium for use in electronic devices, characterized in that, The storage medium carries one or more computer programs that can be executed by the electronic device, thereby enabling the electronic device to implement the process escape prevention control method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Implementation method for judging legality of client request by server
CN110933081A
Cache access control method and device, computer equipment and storage medium
CN112532604A
Data verification method for preventing process jump
CN114329515A
Random token generation method based on online interactive WEB dynamic defense
CN115208577A