oos-utils icon indicating copy to clipboard operation
oos-utils copied to clipboard

Checking page_id and app_user for creating session

Open OliverLemm opened this issue 8 years ago • 3 comments

In the package oos_util_apex in the procedure create_session the parameter p_user_name and p_page_id are not checked. If using collections or other features relying on a session created with that function there can be errors when the page or the user doesn't exist.

plz check these values like: select page_id from apex_application_pages p where p.page_id = p_page_id and p.application_id = p_app_id;

and select u.user_name from apex_workspace_apex_users u where u.workspace_id = l_workspace_id;

OliverLemm avatar Mar 02 '16 14:03 OliverLemm

@OliverLemm I have applied the suggested check that p_page_id exists. Regarding the p_user_name do you know what happens if the application uses a different authentication scheme from the default APEX authentication scheme?

martindsouza avatar Mar 07 '16 00:03 martindsouza

No, but i got following error when creating a session with a wrong username and working with collections:

ORA-01400: Einfügen von NULL in ("APEX_050000"."WWV_FLOW_COLLECTIONS$"."USER_ID") nicht möglich

in english it should be: ORA-01400: INSERT NULL in ("APEX_050000"."WWV_FLOW_COLLECTIONS$"."USER_ID") is not possible

OliverLemm avatar Mar 09 '16 16:03 OliverLemm

@OliverLemm Can you please check what happens when a custom authentication scheme is used and you pass in a valid user name (for the authentication scheme) that is not an APEX Workspace user. If that works then I don't think we can create a p_user_name check.

martindsouza avatar Mar 12 '16 18:03 martindsouza