APEX_UTIL. PREPARE_URL() checksum
Hello
is it possible to create a link to HTML with checksum included as:
< a href = APEX_UTIL. PREPARE_URL ('f? p = & APP_ID.:12: & APP_SESSION.:P26_EB_ID:55') >
(APEX_UTIL. PREPARE_URL is required for the checksum)
Thanks in advance
2685741 wrote:
Update your forum profile with a recognizable username instead of "2685741": Video tutorial how to change username available
is it possible to create a link to HTML with checksum included as:
Where would this HTML link be used?
The ready URL should be generated using the apex_util.prepare_url
before be referenced in the HTML code. One possibility would be to create the URL in an application or page element using a calculation and by referencing the value of the element by using a substitution of static text reference:
Another is a PL/SQL shortcutfunction body, there are important restrictions on where this could be used:
Tags: Database
Similar Questions
-
Hello
I'm on APEX 4.1. Before 4.1 APEX, I was able to generate a link with apex_util.prepare_url and use it as a public link with parameters in the url and a checksum to avoid that the values of the parameters are updated by users.
With APEX 4.1, I have the following error:
"No amount of control has been provided to show the treatment for a page that requires a checksum when one or more application, clear the cache or argument values are passed as parameters."
My page has authentication value "Page is public" and value «Arguments must have Checksum» Page Access Protection
Fields of text on the page have the Protection of the State from Session value "Required Checksum - Level Application".
To generate the link I use the code:
() apex_util.prepare_url
p_url = > ' f? p = 33926:2:P2_I, P2_C:123, 456',
p_checksum_type = > 'PUBLIC_BOOKMARK')
I created test on apex.oracle.com pages to display the error message.
1 page the link generated by the prepare_url function.
Simply copy and paste this link in the browser to access the page (Page 2) which must show the fields with the values passed in the url.
workspace: sdo1974
username: [email protected]
password: sdo1974
Thanks for your help
SEBHi Seb,
hit you bug # 12931249 described in the list of issues known to the http://www.oracle.com/technetwork/developer-tools/apex/application-express/41-known-issues-485406.html
The good news is that a single patch is available to fix this bug.Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
apex_util.prepare_url with the translated applications
I have two questions about the use of apex_util.prepare_url with the translated applications:
- Why is-checksum in a different translated application of checksum in the original application?
- Is there a way to control the apex_url.prepare_url checksum function calculates?
I have no application in both languages English (en) and Slovenian (sl). Link with English checksum would work if I put the Application primary language to English and the link with the Slovenian checksum would work if I set the main language Application to Slovenian. Application language is derived from the main language Application.
Sometimes, the real problem for me is I have 'English' version of checksum when apex_url.prepare_url is called from the "Slovene" to application version. As I mentioned before 'English checksum' does not work if the Application language is set to Slovenian.
I have reproduced this behavior (with the exception of the problem described in the previous paragraph) on http://apex.oracle.com/pls/apex/f?p=15120. An application illustrates an another unanswered question/bug related to translated app:
Is this Bug to Oracle APEX? Can anyone provide any advice or workaround?
Hello
bookmarkable (amounts of application or user level control) control totals depend on a salt value that is stored in the application. If the salt is null, there is a fallback to the alias of the application. If you update the salt by clicking "Expire bookmarks" on request > security attributes and re - publish the application, salt must be synchronized between the applications. Control totals should be the same, then.
Kind regards
Christian
-
apex_util.prepare_url outside the ApEx
Hello
I'm trying to create a weekly task that sends an HTML email with links to the user session state protection application. However when I try to generate the URL with apex_util.prepare_url the checksum is not added to the chain. wwv_flow_api.set_security_group_id seems to have no effect.
Any ideas?
Kind regards
Dan
http://danielmcghan.us
http://sourceforge.NET/projects/tapigenDan,
Unfortunately, you have to jump through hoops to do it. I posted recently a method that defines a session programmatically context, that is, from outside the simple HTTP request for an application. What follows is an adaptation that allows prepare_url to do its thing. You can connect to SQL * more like your application schema and check it out:
set serveroutput on DECLARE l_cgivar_name owa.vc_arr; l_cgivar_val owa.vc_arr; -- l_workspace_id number; l_application_id number := 132; /* change this to your application ID */ l_user varchar2(30) := 'USERUSER'; /* change this to the username to be associated with the session */BEGIN -- set up cgi environment htp.init; l_cgivar_name(1) := 'REQUEST_PROTOCOL'; l_cgivar_val(1) := 'HTTP'; owa.init_cgi_env(num_params => 1,param_name => l_cgivar_name,param_val => l_cgivar_val); -- find workspace ID of application for c1 in (select workspace_id from apex_applications where application_id = l_application_id) loop l_workspace_id := c1.workspace_id; end loop; -- set security group ID, session ID, app ID globals wwv_flow_api.set_security_group_id(l_workspace_id); apex_application.g_instance := wwv_flow_custom_auth.get_next_session_id; apex_application.g_flow_id := l_application_id; -- create authenticated session for l_user wwv_flow_custom_auth_std.post_login( p_uname => l_user, p_session_id => null, p_flow_page => apex_application.g_flow_id||':'||1); dbms_output.put_line('workspace:'||v('WORKSPACE_ID')||', session:'||apex_application.g_instance||', user:'||apex_application.g_user); -- call wwv_flow.show so that the correct parsing schema and other globals are established for the application wwv_flow.show ( p_flow_id => apex_application.g_flow_id, p_instance => apex_application.g_instance, p_request => 'FSP_SHOW_POPUPLOV' ); -- set array of protected page IDs for session state protection wwv_flow.g_protected_page_ids(1) := '1'; -- this establishes page 1 as an SSP-protected page -- generate link with checksum using prepare_url dbms_output.put_line(apex_util.prepare_url('f?p=' || v('APP_ID') || ':1::dummyrequest','utf-8','2')); -- the request references page 1, designated as a protected pageEND;/
Note, the username parameter and the call to wwv_flow_custom_auth_std.post_login is necessary only if you want to generate a checksum of user (type '2') level. Links using this type of checksum may be used only by the same authenticated user which was set up during the generation of the checksum. For links that can be used by any authenticated user, a checksum of the application (type 1) level can be requested from prepare_url and for this, the user name parameter and the call to wwv_flow_custom_auth_std.post_login are useless.
The second argument to prepare the url must match the implementation REQUEST_IANA_CHARSET of your DAD and the third argument is the type of checksum (3 = level of the session and is not appropriate here, 2 = user-level and requires you to make the configuration of the username first, 1 = application-level).
Scott
-
apex_util.prepare_url
Hello!
I use
in the region of PL/SQL to create dynamic links to pages in my application.htp.p('<a href = "link" >title</a>');
How can I write apex URL in the href tag to just go on the page of the application, let's say 21?
I tried with apex_util.prepare_url:
But it generates "f?" ' p = 0:12: "linkhtp.p('<a hrefff = "' || apex_util.prepare_url('f?p=&APP_ID.:21:&APP_SESSION.::::') ||'">link name</a>');
Spooky says:
Hello!I use
htp.p('title');
in the region of PL/SQL to create dynamic links to pages in my application.
How can I write apex URL in the href tag to just go on the page of the application, let's say 21?I tried with apex_util.prepare_url:
htp.p('link name');
But it generates "f?" ' p = 0:12: "link
This is the expected behavior. Take a look at the examples in the documentation - note the description for the main "p_url" setting (my accent is "BOLD"):
>
p_url f? p relative URL with all resolved substitutions
>This means that you must replace the values in the code itself, rather than passing references (if you want to use prepare_url, in other words).
-
Question of Apex_Util.Prepare_URL due to the Apex Util advise msg
Hello
I have the following code in a SQL statement in an IRR:
APEX_UTIL. PREPARE_URL (p_url = > ' f? p =' | v ('APP_ID') |) ': 398 :'|| v ('APP_SESSION'): ':NO:398:P398_IDOBJ. VIMG_SEARCH. IDOBJ:', p_checksum_type = > 'SESSION') FullImg,.
And it works as expected. However when I run the Util Apex advise I get the following:
Region Source attribute (identifies the source of the region, region Type of reference Source)
Check the V function used in SQL statements
Performance category
Message contains V/NV/DV function call in the SQL statement (can be a performance issue).
Do I need to worry about this? or should I change the syntaxt in the APEX_UTIL. PREPARE_URL settings?
Thank you
DanielIn SQL (PL/SQL within the APEX blocks) the notation of the bind variable must be used:
APEX_UTIL.PREPARE_URL( p_url => 'f?p=' || :APP_ID || ':398:'||:APP_SESSION||'::NO:398:P398_IDOBJ:||VIMG_SEARCH.IDOBJ:', p_checksum_type => 'SESSION') FullImg,
V (...) notation is intended for program units PL/SQL database called from APEX.
-
apex_util.prepare_url - by the way a comma between the item values
Hello
I created an application to illustrate a problem I'm having with the help of apex_util.prepare_url: http://apex.oracle.com/pls/otn/f?p=test_prep_url
' Tab ' without prep. url "displays a chart linking from this page (1) 2 using the usual f? syntax of p in the link, through two values, one for p2_schema_name and one for the p2_job_name values hidden on page 2. It works fine and the page 2 table displays data based on these past in values.
The link is set up as: ' f? p =' || : APP_ID | ':2:' || : APP_SESSION. ": NO:2:P2_schema_name, P2_JOB_NAME:' |" schema_name | ',' || JOB_NAME
' Tab ' with prep. url "displays a chart which links from this page (3) on page 4 use apex_util.prepare_url to prepare the connection, passing two values, one for p4_schema_name and one for the p4_job_name in the values hidden on page 4. However, the decimal point is rendered in the browser '% 252C' url and p4_schema_name has the value "SCHEMA_A % 2CJOB_3" and p4_job_name is null (instead of = "JOB_3"). Of course, no data is found.
The link is set up as: APEX_UTIL. PREPARE_URL ('f? p =' |: APP_ID |) ':4:' || : APP_SESSION. ": NO:4:P4_schema_name, P4_JOB_NAME:' |" schema_name | ',' || JOB_NAME)
So I say to myself that I send you the value of point across properly, but I don't know what I would do differently. I hope the demo app described my problem enough so that someone can point out my blunder.
The reason why I use APEX_UTIL. PREPARE_URL is that I would like to use session state protection and through the amount of control, but until I can get the sorted comma, I can't turn on session state protection.
Thank you for your help.
AlanUpdate: it is not prepare_url that does. Prepare_url encodes the comma in the list of item as % 2 c values. Then when the table XML gets converted to a blob for output, the % sign is encoded again. We will have to figure out what to do about this. In the meantime, only one element value can appear in the f? p link in a flash (fixed SVG chart) chart.
Scott
-
problem with apex_util.prepare_url
Hi @all
I'm trying to use the prepare_url (for the shared services provider) procedure in a select statement to a region of the tree
I want to load for example page 11 in an iframe
Select...
apex_util.prepare_url ('f? p = {APP_ID.}: 11: {SESSION.}: {DEBUG}. ": P10_ID:2" target = 'Fensterlein' ') link.
...
table
result for the link
f?p=APP_ID.:11:session.::Debug.::P10_ID:2%22%20target%3D%22Fensterlein%22
My problem is that the page is called directly and not displayed in the iframe
all ideasHello:
The i-frame is on the same page as the region of the tree? If so, you can use javascript to change the contents of the region i-frame. The link colimn in the tree could be something like
'javascript:refreshFrame("f?p=&APP_ID.:&PAGE_ID.:&SESSION.::::P10_ID:2")'
and refreshFrame is the JS function
CITY
-
Trouble getting an apex_util.prepare_url to produce the control sum
Protection of the session state is enabled in both applications & the attribute "access protection Page" page has the value "Arguments must have Checksum.
Does not checksum...
http://Apex.Oracle.com/pls/Apex/f?p=34780:3
I've even entered the SSP and had it activated for all page elements and pages and is not always make the difference.
Select 'x', APEX_UTIL. PREPARE_URL ('f? p ='|: APP_ID |) ':1::' || : APP_SESSION. P1_EMPNO :') double employee_link;
Different application even ask questions. Sum insured
http://Apex.Oracle.com/pls/Apex/f?p=39900:3
Select 'x', APEX_UTIL. PREPARE_URL ('f? p ='|: APP_ID |) ':1::' || : APP_SESSION. P1_EMPNO :') double employee_link;
Any ideas?
Justin
workspace: epicOk.. seems to me that:
Justin Patterson wrote:
Does not checksum...
http://Apex.Oracle.com/pls/Apex/f?p=34780:3SSP screenshot
http://Tinypic.com/r/k4fjvc/7There is No page 1, so no checksum would be generated;).
>
Different application even ask questions. Sum insured
http://Apex.Oracle.com/pls/Apex/f?p=39900:3SSP screenshot
http://Tinypic.com/r/5fnst2/7This is page 1, so the checksum is generated.
..
In addition, the app_session is in the wrong place.
Van
Trent -
Please see my previous post
{: identifier of the thread = 2530873}
How can I add a checksum for my url column
GusGus C wrote:
Tried several times to get the code, but to no avail.
My last attempt was''||Inventory||''
Can anyone help please
Gus
Hello Gus,
You must specify the type of control-sum...
See link above...
Try...
'<a href="'||APEX_UTIL.PREPARE_URL('f?p='||:APP_ID||':10:'||:APP_SESSION||'::'||:DEBUG||'::'||'P10_JOBID:'|| jobid,NULL,'SESSION') ||'">'||Inventory||''
Kind regards
HariAdded link... Published by: Hari_639 on May 2, 2013 11:53
-
Adding checksum to URL for pop-up window
Using Apex 4.1.1
I have the button that opens a pop-up indicating a report passing a parameter in the URL. The button calls the javascript function as defined below:
Everything works fine, but for safety, I would add the checksum to the arguments in URL. I had a look at the API Javascrpt for Apex and unfortunately it takes place to create a checksum that I can add to the URL.<script language="JavaScript" type="text/javascript"> function newReport() { url = 'f?p=&APP_ID.:37:&APP_SESSION.::NO::P37_ORDER_ID,P37_PLACE_ID,P37_NCR_TO:&P21_ORDER_ID.,&P21_PLACE_ID.,&P21_NCR_TO.'; w = open(url,"winLov3","position=center, top=1,left=0,Scrollbars=0,resizable=0,width=800,height=800"); if (w.opener == null) w.opener = self; w.focus(); } </script>
Is the one that I missed, or is it possible to do so by other means? See you soon.May be a more standard, more simple way, but may be a way...
Create a hidden item to store the URL in.
Create a dynamic action, certain events (e.g. click on the button).
1st real action: run PL/SQL.
Use APEX_UTIL. API PREPARE_URL CALL, assign the value to the element
for example: P1_URL: = apex_util.prepare_url('url'); -This function generates the appropriate checksumBelow in the code section, there's a setting: elements of the back Page. This is the value of your hidden page element.
2nd real action: run JavaScript.
Simply use the value returned from the PL/SQL
for example window.open ($v ('P1_ITEM'));
I think it should work...
-
Is there a way to get the checksum for a conditional link?
Hello everyone,
I use APEX 3.2, here's my problem.
We are generating a report containing several links in option. Since we need a checksum for security issues, can we do something like this:
select case when x.col1 > 2 then '<a href="f?p=&APP_ID.:2:&SESSSION.::NO:2:P2_EMP_NO_SEQ,P2_EVA_NO_SEQ,P2_ANE_NO_SEQ:1457%2C1457%2C1&cs=*&CHECKSUM.*>' || x.col2 || '</a>' else ' - ' end link from table x; {code} I need to add manually the checksum values to my links. Do you know any way to do that ? Thank you ! Leinad
Use apex_util.prepare_url, scroll down in this thread for the full syntax:
Re: Issue of APEX field validation
Kind regards
Malcolm. -
Protection of session state - Arguments must have Checksum - help needed
Hello world
I use apex 4.0 and that you have defined:
Protection of session state = True
Page = Arguments access protection must have the checksum
Point of application protection = Cecksum required - Session level
Page data entry point Protection = required Cecksum - Session level
Page Display-Only item = Cecksum required - Session-level Protection
On the pages that contain an interactive report, calls to other pages updated and or to delete a record from the pharmacokinetics of recording work OK.
I put these as follows:
In the Interactive report link-> Link attribute column = onclick = "new top. Ext.apex.PopupWindow ({url: this.href, title: 'Change collation details', width: 530, height: 500, listeners: {'success': gReport.search}}). show(); return false; »
Target = this Application Page
Page = 302Item = P302_IDCLASS
Value = #IDCLASS #.
Page Checksum = - default user.
The problem is the button 'Create a new record' that is on the page of interactive report. I set the button as:
The attributes button = onclick = "new top. Ext.apex.PopupWindow({url:'f?p=&APP_ID.:302:&APP_SESSION.::NO:302:::',_title:_'Create_New_Classification',_width:_530,_height:_500,_listeners:_{'success':_gReport.search}}).show (); return false; »
Action when click = redirect to the Page of this Application
Page = 302
Clear Cache = 302
When I click the button I get the following message:
Session state protection violation: this can be caused by a manual change to a URL containing a checksum or using a link with a missing or incorrect checksum. If you don't know what caused this error, contact the administrator of the application for assistance.
If I change the attributes of the button to be:
OnClick = "new top. Ext.apex.PopupWindow({url:'f?p=&APP_ID.:302:&APP_SESSION.::NO:::',_title:_'Create_New_Classification',_width:_530,_height:_500,_listeners:_{'success':_gReport.search}}).show (); return false; »
It works OK, bu page elements are not clear.
Could somebody please explaing to me what I am doing wrong so I understand my mistake?
Thank you
DanielHello
If I understand correctly what you need...
Create a point of the MY_BTN_URL application.
You can set this element of Protection of the Session State to 'Restricted - cannot be resolved in the browser.
Create the calculation of demand for this article
Calculation Point: Before header
Calculation type: PL/SQL Expression
Calculation:APEX_UTIL.PREPARE_URL ( p_url => 'f?p=&APP_ID.:302:&APP_SESSION.::NO:302::::', p_checksum_type => 3 );
Change your attributes of button
onclick="new top.Ext.apex.PopupWindow({ url:'&MY_BTN_URL.', title: 'Create New Classification', width: 530, height: 500, listeners: {'success': gReport.search} }).show(); return false;"
Kind regards
JariPublished by: jarola October 25, 2011 15:50
Published by: jarola October 25, 2011 16:16
-
Add Checksum for Drill Down Chart
I have created a graph than forests until a report when the user clicks on a bar in the graph.
I've now changed my pages so a checksum is required.
When I click on a bar in the graph, I get a checksum error.
How can I add a checksum to the link on the list?
GusHello
You might try graphic query
SELECT APEX_UTIL.PREPARE_URL('f?p='|| :APP_ID ||':29:'|| :APP_SESSION ||'::::P29_GARRISON:'||GARRISON,null,3) AS LINK, GARRISON, SUM(ACTUAL_STR+DEP_ADULT+DEP_CHILD) AS POPULATION FROM PS_ALL_DATA WHERE G_CODE 3 GROUP BY GARRISON ORDER BY GARRISON
Kind regards
JariPublished by: jarola on October 22, 2010 12:40
error corrected
-
How to build a URL with Checksum in "JAVASCRIPT"?
Hi all..
Could someone help me how to construct a URL with "checksum" in javascript?
With PL/SQL, we can use apex_util.prepare_url to get the url with checksum. How can I make if I build the URL in javascript?
Please help me with this.
Thank youHello
Just an idea, in your javascript code, you can call an ajax function to construct your URL with PL/SQL code and then return the URL and use it in your javascript code.
I have never tried but maybe works.Kind regards
SDDC
Maybe you are looking for
-
Skype does not not when receiving calls
whenever I tried to answer a call using Skype-Skype. the entire screen would freeze and the tab will show "program does not. I am currently using the latest version of Skype 6.22. Please notify. attached is the result of the diagnosis
-
entry 100 pin voltage measure switching device
I have a number of 100 harness cable pin I need to check the output voltage on. I need to be able to select the two pins (tension and back) and move them towards a pass to tension. Unfortunately, each cable is unique, so I have to be able to select a
-
Retrieve tdx without tdm file data
Hello I have a tdx 3.7 GB containing important data file, but the file TOC is empty. All my other files are fine and I barely noticed it (although it is probably the second most important). I hope that it is of the tdx data recovery? I wondererd if I
-
is it possible to download an ISO of XP Home SP2 or SP3 (if she was never RTM)
I'm trying to reinstall the new copy of XP Home on a laptop that needs a new HARD drive. I am able to get a XP Home ISO by microsoft download, so I can do this repair?
-
Vista goes into sleep mode automatically just after the restart
The following problem was irregular. Sometimes, other times not. I'm totally frustrated as to why it is happening and I would like to solve this problem, now and forever. Yes, first facts: I have an Asus G71Gx laptop game with Nvidia Geforce GTX 260