Is it possible to generate a checksum on a URL before calling "f"

I have an AJAX process which adds a number of additional arguments that get passed through the URL, i.e. "&argname=" that are not supported via htmldb_Get or the "f" procedure. As a work around I have created my own PLSQL wrapper around the function which has these additional arguments which works fine, and I simply alter the URL string i.e. "p" before calling the "f" procedure in this PLSQL wrapper.
However this will not work when session state protection is enabled as when I call "prepare_url" to generate a checksum on my newly altered URL it returns null as expected because I'm outside of the APEX engine. So the question is is there any way I can generate a checksum in this wrapper procedure. I have a valid APEX session and cookie can pass though all the needed details.... I have had a good look through the APEX API's but can't find anything. Can anyone help?

Hi Scott, it's Matt
Thnks mate, much appreciated for replying to this thread!
Essentially I have an authenticated APEX session and I'm doing an AJAX post to my own custom PLSQL wrapper procedure instead of using "f" as i have a number of arguments that do not match the signature of that procedure which are being generated by an external JS library API. I'm simply changing the URL that will be passed to it e.g. here's a cut down version of my procedure to give you an idea of what I'm doing...
create or replace PROCEDURE   FCUSTOM
( p                       IN VARCHAR2
, p_sep                   IN VARCHAR2 DEFAULT NULL
, p_trace                 IN VARCHAR2 DEFAULT NULL
, c                       IN VARCHAR2 DEFAULT NULL
, pg_min_row              IN VARCHAR2 DEFAULT NULL
, pg_max_rows             IN VARCHAR2 DEFAULT NULL
, pg_rows_fetched         IN VARCHAR2 DEFAULT NULL
, fsp_region_id           IN VARCHAR2 DEFAULT NULL
, success_msg             IN VARCHAR2 DEFAULT NULL
, notification_msg        IN VARCHAR2 DEFAULT NULL
, cs                      IN VARCHAR2 DEFAULT NULL
, s                       IN VARCHAR2 DEFAULT NULL
, callback                IN VARCHAR2 DEFAULT NULL
, totalrows               IN VARCHAR2 DEFAULT NULL
, sort                    IN VARCHAR2 DEFAULT NULL
, dir                     IN VARCHAR2 DEFAULT NULL
, app_id                  IN VARCHAR2 DEFAULT NULL
, page_id                 IN VARCHAR2 DEFAULT NULL
, session_id              IN VARCHAR2 DEFAULT NULL
, action                  IN VARCHAR2 DEFAULT NULL
) AS
  l_override        VARCHAR2(32767);
  l_fsp_sort        VARCHAR2(50);
  l_workspace_id    NUMBER;
  l_items           VARCHAR2(32767);
  l_item_values     VARCHAR2(32767);
BEGIN
  FOR c0 IN (SELECT workspace_id
             FROM   apex_applications
             WHERE  application_id  = app_id)
  LOOP
    l_workspace_id := c0.workspace_id;
  END LOOP;
  -- We need to do the following to access the apex data dictionary
  wwv_flow_api.set_security_group_id(l_workspace_id);
  Unfortunately you cannot access/set session state outside of the f function,
  i.e. if you wrapper around it as you essentially are unauthenticated/identified
  APEX_UTIL.SET_SESSION_STATE
  ('PAGINATION_CALLBACK_START',callback||'(');
  APEX_UTIL.SET_SESSION_STATE
  ('PAGINATION_CALLBACK_END',totalrows||')');
  IF action = 'Sort' THEN
    -- We need to lookup the column name to get the sequence id for the sort
    -- portion of the Apex page request e.g.
    -- FLOW_PPR_OUTPUT_R'+pId+'_'+pSort+'::RP&fsp_region_id='+pId;
    FOR c1 IN (SELECT 'fsp_sort_'||display_sequence||decode(dir,'DESC','_desc','') fsp_sort
               FROM   apex_application_page_rpt_cols
               WHERE  application_id  = app_id
               AND    page_id         = page_id
               AND    region_id       = fsp_region_id
               AND    column_alias    = sort)
    LOOP
      l_fsp_sort := c1.fsp_sort;
    END LOOP;
    -- We need to set the pagination function javascript callback via the URL
    -- as wen not set session state using API's
    l_override := p;
    l_override := regexp_replace(l_override,'FLOW_PPR_OUTPUT_R.*$', 'FLOW_PPR_OUTPUT_R'||fsp_region_id||'_'||l_fsp_sort||':NO:RP');
    l_items := ':PAGINATION_CALLBACK_START,PAGINATION_CALLBACK_END,GRID_SORT_COLUMN';
    l_item_values := callback||'(,'||totalrows||'}),'||sort;
  ELSE
    -- We need to set the pagination function javascript callback as we are expecting
    -- the JSON object to be wrapped in this callback function
    l_override := p||':';
    l_items := 'PAGINATION_CALLBACK_START,PAGINATION_CALLBACK_END';
    l_item_values := callback||'(,'||totalrows||')';
  END IF;
  -- Lets append the items and their values to the URL string
  l_override := l_override || ':' || l_items || ':' || l_item_values;
  f
  ( p                 => l_override
  , cs                => NULL
  , pg_min_row        => pg_min_row+1
  , pg_max_rows       => pg_max_rows
  , pg_rows_fetched   => pg_rows_fetched
  , fsp_region_id     => fsp_region_id
END;
grant execute on FCUSTOM to public
drop public synonym FCUSTOM
create or replace public synonym FCUSTOM for myuser.FCUSTOM
/And this works fine until I enable session state protection as set the page to require arguments with checksums, which I expected because I can't actually access session state as I'm outside of the apex engine in my wrapper procedure. I was just wondering if it's possible to run several APEX API calls which can check the validity of my session and cookie and allow me to run prepare_url and/or update session state values.
I'm thinking you're probably going to come back and say no as that would create a security vulnerability, but if you do could you explain why in a little detail, purely because I'm interested in knowing why when I have an authenticated APEX session and valid cookie?

Similar Messages

  • Generating SSP checksum from PL/SQL?

    Hi,
    If you use SSP and need to call a page from a PL/SQL based page is there an API that can be used to generate a checksum for the URL?
    Regards Pete

    Check -
    SSP checksum in Javascript envoked URL
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

  • Is it possible to generate this XML file?

    Hi guys,
    I'm starting to work with XML features at Oracle an I would like to know if it is possible to generate the following XML file with Oracle:
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA_IMPORT LOCALE="en_GB" VERSION="5.2">
    <RULE_SET>
    <RULE BUSINESS_UNITS="Canada" CALENDAR="Main Monthly Calendar" EFFECTIVE_END_DATE="01-Jan-2200" EFFECTIVE_START_DATE="01-Jan-2005" NAME="CAN-Direct Sales Booking Credit" TYPE="DIRECT_TRANSACTION_CREDIT">
    <ACTION_EXPRESSION_SET>
    <ACTION_EXPRESSION>
    <FUNCTION ID="DIRECT_TRANSACTION_CREDIT" RULE_TYPES="DIRECT_TRANSACTION_CREDIT">
    <OUTPUT_REFERENCE NAME="CAN-Direct Sales Booking Credit" PERIOD_TYPE="month" TYPE="Credit" UNIT_TYPE="Can"/>
    <DATA_FIELD>SalesTransaction.value</DATA_FIELD>
    <HOLD_REF NAME="Release Immediately" PERIOD_OFFSET="0" PERIOD_TYPE="Release Immediately"/>
    <STRING_LITERAL>NULL</STRING_LITERAL>
    <CREDIT_TYPE>booking</CREDIT_TYPE>
    <BOOLEAN>false</BOOLEAN>
    <BOOLEAN>true</BOOLEAN>
    <DATA_FIELD>SalesTransaction.compensationDate</DATA_FIELD>
    </FUNCTION>
    </ACTION_EXPRESSION>
    </ACTION_EXPRESSION_SET>
    <CONDITION_EXPRESSION>
    <OPERATOR ID="ISEQUALTO_OPERATOR">
    <DATA_FIELD>SalesTransaction.eventType.eventTypeId</DATA_FIELD>
    <STRING_LITERAL><![CDATA[booking]]></STRING_LITERAL>
    </OPERATOR>
    </CONDITION_EXPRESSION>
    <TERRITORY_EXPRESSION>
    <RULE_ELEMENT_REF ID="TERRITORYVARIABLE" NAME="CAN-Territory Variable"/>
    </TERRITORY_EXPRESSION>
    </RULE>
    </RULE_SET>
    </DATA_IMPORT>
    I investigated some of the dbms_xmlgen features, but I can't understand how to define the following tag, for example:
    "<RULE BUSINESS_UNITS="Canada" CALENDAR="Main Monthly Calendar" EFFECTIVE_END_DATE="01-Jan-2200" EFFECTIVE_START_DATE="01-Jan-2005" NAME="CAN-Direct Sales Booking Credit" TYPE="DIRECT_TRANSACTION_CREDIT">"
    Any help is welcome.
    Thanks.
    Rui Barata

    I would offer that the SQL/XML functions of XMLElement/XMLForest/XMLAgg would be more appropriate to your situation. They give you finer control over the XML that is generated. You can find examples in this forum or the {forum:id=34} forum.

  • Is it possible to generate outbound idocs for FI invoices? How?

    Is it possible to generate Outbound idocs for FI invoices? How? or else i have to write program to get data in file and pass it to translator. Please help.

    Dear Gabriel
    Before letting you know the possibility, can you please let me know why you want such a requirement, since standard has not provided such copy control, to my knowledge.
    As you would know order type KB is for consignment fillup where you are just transferring the goods from FG unrestricted to your own warehouse and that is why in standard you can see the copy control KB --> F8 which means you can raise proforma against delivery and not against fillup order.
    So think of whether really you wanted to raise proforma against fillup order which is NOT recommended by SAP.  However, still if you feel that the requirement is so to have, you can make the settings in VTFA.
    thanks
    G. Lakshmipathi

  • Any possibility to generate the bill first than Delivery & Picking?

    Hi SD GURUS & EXPERTS,
    We know that standard procedure of SAP SD is Sales Order --> Outbound Delivery -> Picking --> Billing. It means delivery & Picking is carried out before billing, and as we pick the material stock deducted from the inventory.
    But in my scenario, Customer has a grace period of 7-15 days to get the delivery. It means Customer deposit the money at office than Billing should be generate (from Office). This bill sent to the ware house and ware house deliver the material against this Bill.
    If we carried out standard procedure than there will be difference in Physical as well as System stock.
    So, is there any possibility to generate the bill first than Delivery & Picking.
    Thanks in advance.
    Devendra Singh Chauhan

    we do not maintain the Customer Master
    Not necessary.  For this purpose only, SAP has given an Account Group "One Time Customer" which you can make use of this.
    With the same customer code, you can change the address as and when your client got a sale order from such customers.
    With this customer code, you can create sale order, delivery, billing.  In fact, you should be aware, SAP will allow you to generate proforma against a delivery that is not PGId.  If at all you dont want to do PGI, you can make use of this option.
    Needless to say, the system (billing and then delivery) what you had indicated is definitely not recommended.
    thanks
    G. Lakshmipathi

  • Possible to generate graphics within smart forms dynamically like SVG ?

    Hello,
    I would like to generate a graphic for a smart form. This graphic will only be needed in the smart form. Therefore my question:
    It is <b>possible to generate dynamically graphics using ABAP</b> as programming language? In the same line like SVG (Scalable Vector Graphics) or ChartDirector? I know it works in many other programming languages.
    Smart forms can handle *.bmp and *.tif picutres. Therefore the output of this ABAP program should be a picutre within the format *.bmp and *.tif.
    Daniel

    Welcome to SDN,
    I am not sure whether you can use SVG in smart form, but certainly in ABAP yes. check out the following atricle for more info.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to generate and display svg graphics in abap,%20Part%201.article
    Regards
    Raja

  • Possible to generate graphics dynamically using ABAP?

    Hello friends,
    It is possible to generate graphics dynamically using ABAP as programming language? In the same line like SVG (Scalable Vector Graphics) or ChartDirector?
    Output of this abap program should be a picture.
    Daniel

    Hi Daniel,
    Have a look at URL
    http://help.sap.com/saphelp_nw04/helpdata/en/0c/5c55a8d0a611d2963100a0c9308b1f/content.htm
    Also have a look at SGRB Package/deveoplment class.
    Thanks
    Lakshman
    Message was edited by: Lakshman Tandra

  • DMEE tree:it's possible to generate more files using one DMEE format tree?

    Hello Expert,
    I have a question and i need you help.
    It's possible to generate two files with one DMEE format tree? If yes, how can i do it?
    Thank you in advance.
    Amal

    In DMEE we define the structure ie the kind of feilds that needs to be populated.As far as my knowledge I think one DMEE tree can be used to create one file FORMAT
    Thanks,
    K.Kiran.

  • Is it possible to generate a user event when shared variable value change on RT target?

    Hi,
        I wonder if it is possible to generate a user event when a network published shared variable value change?
        Thanks a lot!
        Regards,
        Tom

    Tom,
    I understand not wanting to waster resources on polling but I am not aware that LabVIEW can automatically generate an event on a SV change.
    Maybe a better solution...
    You could implement lower level TCP communication (i.e. have a look at STM - simple messaging protocol) for passing data betweeen RT and PC (instead of using a SV).  You could send a generic command (boolean trigger maybe?) from your RT system when the value of whatever it is the SV is storing has changed.  You can avoid polling on the non-RT system this way.
    Dan

  • Is it possible to generate a mouse click at specific coordinates on the stage?

    Let's say x = 100 and y = 100. So, I have my main swf file that contains an external swf file with a button. Would it be possible to generate a mouse click on that button?
    Any help would be greately appreciated.

    You don't do it that way - you'd just tell the button to dispatch a CLICK MouseEvent and anything listening for the click would get it... something like:
    myButton.dispatchEvent(new Event(MouseEvent.CLICK));

  • Do you know if it's possible to generate Word 2003 files from RoboHelp if we're using Office 2007 and RoboHelp 2007?

    Do you know if it's possible to generate Word 2003 files from
    RoboHelp if we're using Office 2007 and RoboHelp 2007? We are
    thinking of upgrading, but have customers that would still require
    Word 2003 formats because they won't have 2007 installed.
    Thanks!

    Hi NewtoRobohelp
    Unfortunately I don't have Office 2007 in front of me to test
    with. But I'm thinking that as long as Office 2007 still produces
    the same formats as 2003, you could do it this way.
    From RoboHelp 7 and using Office 2007, generate Printed
    ouptut. Open said printed output in Office 2007 and perform a Save
    As. Save the document as a RTF (Rich Text Format) document.
    RTF is more universal. So I'm thinking this may be a possible
    way around it. There is also the possibility that Word 2007 offers
    up an ability when saving a file to save in an older format.
    Cheers... Rick

  • Zfs scrub took forever and generated many checksum errors

    Hi,
    I have one machine running Solaris 10 10/07 X86_64. It has been a few days since I started "zpool scrub <pool>", but scrub still hasn't made much progress (still at 1.79%). I wonder if the scrub operation will ever complete. On a 4TB file system, how long does "scrub" run to finish generally?
    Also running scrub generated many checksum errors on many disks, is this normally expected? Or something is wrong with hardware?
    Any advice how to make scrub run faster?
    $ zpool status
    pool: bigpool
    state: ONLINE
    status: One or more devices has experienced an unrecoverable error. An
    attempt was made to correct the error. Applications are unaffected.
    action: Determine if the device needs to be replaced, and clear the errors
    using 'zpool clear' or replace the device with 'zpool replace'.
    see: http://www.sun.com/msg/ZFS-8000-9P
    scrub: scrub in progress, 1.79% done, 27h51m to go
    config:
    NAME STATE READ WRITE CKSUM
    bigpool ONLINE 0 0 0
    raidz1 ONLINE 0 0 0
    c3t0d0 ONLINE 0 0 16
    c3t1d0 ONLINE 0 0 14
    c3t2d0 ONLINE 0 0 12
    c3t3d0 ONLINE 0 0 16
    c3t4d0 ONLINE 0 0 6
    raidz1 ONLINE 0 0 0
    c3t5d0 ONLINE 0 0 65
    c3t6d0 ONLINE 0 0 66
    c3t7d0 ONLINE 0 0 87
    c3t8d0 ONLINE 0 0 87
    c3t9d0 ONLINE 0 0 62
    spares
    c3t10d0 AVAIL
    Simon

    what % of the 4tb is used? you could zpool scrub -s <pool> (prob know this..). zpool manpages has: "whereas scrubbing examines all
    data to discover silent errors due to hardware faults or disk failure."
    are you seeing any hw issues with disk controllers or disks themselves in /var/adm/messages since you say you have checksum errors? any fault lights on any disk or array in use?

  • Is it possible to generate a motion control vi from parameters entered into MAX?

    In the process of familiarizing myself with LV, It was brought to my attention that it might be possible to generate a VI from parameters entered into MAX. Is this possible?
    Right now, I am getting familiar with motion control and LV by using MAX's 1D and 2D motion controller interactive environment. I was wondering if there was a way for LV to take the parameters and selections I have made in the various fields and make a VI from it?
    I have tried searching MAX's help, Google searching, etc. but have not found anything.......
    Thanks

    In LabVIEW you can use "Initialize Controller.flx" to load the configuration settings from MAX to the motion control board. There is no way to create vis from the Interactive window, but if you are looking for such a feature, you may want to look into the NI Motion Assistant.
    NI Motion Assistant is an interactive environment for prototyping your motion control application without programming. Later you can export your motion sequence to LabVIEW.
    If you want to test Motion Assistant, you can download an evaluation version here.
    Kind regards,
    Jochen Klier
    National Instruments
    Message Edited by Jochen on 02-12-2010 02:48 PM

  • How to add a checksum to an URL that is called from a redirect ?

    Hello everybody,
    I need to add a confirm message before deleting a line, and since the delete process is in the header of the same page, it use a redirect call. Before, it added the &cs=############## automatically. But since I must use a javascript function to call url, it doesn't contain the checksum (which is normal, because the javascript is run from the browser).
    I need a way to calculate the checksum and put it in my url,when I'm generating the page. Isn't something like &CS. to get the checksum inside the URL ? We get already plenty of information that way like &APP_ID. , &SESSION. , &DEBUG.
    Do you know something about that ?
    Thank you !

    Hi Scott,
    it's the url that is generated when you select "url" instead of "link to a page in this application" inside the state editor page. There is an URL box that appears with a valid link with all the previous data for the link (except the checksum).
    f?p=&APP_ID.:5:&SESSION.::&DEBUG.::HID_14505_SEQ_COMNC_0002,HID_14505_BTN_0012:#IDE_HIST_COMNC#,SI copy that line into a javascript function which redirect the browser.
    So I'm missing the checksum parameter. And I was wondering if there is a way to obtain the checksum and copy inside my javascript link.
    thank you !
    Dan

  • Is there any possiblity to not to take the print out before release of PO

    Is there any possiblity to not to take the print out before release of PO.
    Please give some inputs to set up this in system.

    Hi,
    Thank you for your reply with kindness.I will appreciate your help.
    I found nothing like what you have mentioned .Please find the programme details in my system.Please help in this reagrd.
    FUNCTION EXIT_SAPLMEDRUCK_001.
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             REFERENCE(IX_DRUVO) TYPE  DRUVO
    *"       EXPORTING
    *"             REFERENCE(EX_RETCO)
    *"       CHANGING
    *"             REFERENCE(CX_DOC) TYPE  MEEIN_PURCHASE_DOC_PRINT
    *"       EXCEPTIONS
    *"              NO_OUTPUT
    INCLUDE ZXM01U04 .
    ENDFUNCTION.
    Even-- nothing is avaialble in Include programme also.Please help in this regard.
    What is my further action to this.

Maybe you are looking for

  • How long will it take? --OR-- Which order will arrive first?

    *So, let me fill you in on my order timeline (debacle)...* • July 5 ... I placed order with AT&T *on the phone* for 2 16GB iPhone 4's with 2 new lines of service. (first time iPhone buyer, new -- actually, coming back -- to ATT after 11 yrs w/ Sprint

  • IPhoto wont open with any update of it

    I upgrade to iLife '11 but I can't use iPhoto, I can use perfectly all the other apps in the bundle but iPhoto. I got this message... Process:         iPhoto [6811] Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto  Identifier:      com

  • At selection-screen when user presses back button

    Experts, I have two radio buttons and two relative checkboxes ( one checkbox related to other ). Now when user selects one radio button and executes teh program, there is a summary page. When user presses back button from there, I return to the selec

  • Report on column

    I want a report which on running will ask about a column of some table and then value of that column and display the data. say we have a table T and two fields f1 and f2. On running it should receive f1 or f2 as column names and then in the second pa

  • System 9 Security guide

    Hi, Where do I find the Hyperion System 9 Security Guide refered to in the Planning admin guide? Is it a PDF located somewhere. Thanks CD