This code is to a registration page looks great, but again I get an error message after you typed the following code (below is the error message).
I can not understand what is the error and how it should be the correct code?
Codice mysql per fare dei test (aggiungiamo un utente)
INSERT INTO users (id, username, password, online, email, active, rtime) VALUES
(1, ‘testing’, ‘testing’, 0, ‘fake#noemail.co.uk’, 0, 0);
code looks well.
Try to check that your root user have all the rights and password correct for your host.
as far as i can understand you are running with user root.
go to config file and check for user. If you are using phpmyadmin then you can check it in Privileges tab that your user have privileges to access
Related
I just imported my app into a different workspace (a developer one) and am having issues while trying to open it up. I get the following error:
Insufficient privileges, user is not a Contributor
Access denied by Application security check
Technical Info (only visible for developers)
is_internal_error: true
apex_error_code: APEX.AUTHORIZATION.ACCESS_DENIED
component.type: APEX_APPLICATION_AUTHORIZATION
component.id: 7520010788215408503
component.name: End User Role
error_backtrace:
----- PL/SQL Call Stack -----
object line object
handle number name
0x6e2ee250 960 package body APEX_210100.WWV_FLOW_ERROR.INTERNAL_GET_ERROR
0x6e2ee250 1028 package body APEX_210100.WWV_FLOW_ERROR.INTERNAL_ADD_ERROR
0x6e2ee250 1420 package body APEX_210100.WWV_FLOW_ERROR.RAISE_INTERNAL_ERROR
0xab143348 831 package body APEX_210100.WWV_FLOW_AUTHORIZATION.IS_AUTHORIZED
0x6137ca48 2919 package body APEX_210100.WWV_FLOW.SHOW
0x6137ca48 5323 package body APEX_210100.WWV_FLOW.RESOLVE_FRIENDLY_URL
0xb05740f0 4 anonymous block
I tried to add myself as an admin using the following procedure:
begin
APEX_ACL.ADD_USER_ROLE (
p_application_id => 255,
p_user_name => 'SCOTT',
p_role_static_id => 'ADMINISTRATOR' );
end;
And I actually see myself on the apex_appl_acl_user_roles table but still get the same result when trying to open up my app.
Authorization Scheme (shared components -> security) is set to 'End User' (which is basically two levels down on the hierarchy. Admin being the top one).
Does anyone know how to fix this?
thanks!
Roles are exported along with the app, users are not. Try giving yourself all roles via Shared Components > Application Access Control. Or use sql commands to backup the other apps' roles and restore them in this workspace. Here is a blog explaining how you can do that: https://seanstuber.com/2019/06/06/extracting-apex-access-control-users/
I have a Window 10 vb.net main process (tester) that needs to create a process to clean up certain registry area. The products we test have a single FTDI serial port adapter, but over time these instances build up and slow the registry to a crawl.
As the main process starts, the desire is to use an off the shelf utility, DeviceCleanupCmd.exe, to search and remove the driver instance build up. This requires administrator privileges for that sub process. I've been able to do this on XP with script, but the system is running with full administrator privileges. Since it's not on the network, there's very little risk.
Moving forward, we are trying to replace the XP system with a Windows 10 Enterprise box that is network connected. I wanted to incorporate the equivalent of the script into the vb.net process and I modified the vb.net application to use
Process() with StartInfo.Verb = "runas"
Local user credentials (not a domain user) the application provides to start the sub process.
Using this method, my sub process executes, but not with administrator level privileges. The Stackoverflow reference below explains that I can't use this method and have to use CreateProcessWithLogonW. I understand Ian Boyd's concerns for security in the post.
Run process as administrator from a non-admin application
I have followed the Microsoft implementation that follows and am still having issues.
https://learn.microsoft.com/en-us/troubleshoot/dotnet/visual-basic/start-process-as-another-user
Here's the essential part of my code. You will see that I truncated the MS example to use the W2K portion, as we won't be going back that far!
wUser = System.Text.Encoding.Default.GetString(UnicodeStringToBytes(UserName + Chr(0)))
wDomain = System.Text.Encoding.Default.GetString(UnicodeStringToBytes(DomainName + Chr(0)))
wPassword = System.Text.Encoding.Default.GetString(UnicodeStringToBytes(Password + Chr(0)))
wCommandLine = System.Text.Encoding.Default.GetString(UnicodeStringToBytes(CommandLine + Chr(0)))
wCurrentDir = System.Text.Encoding.Default.GetString(UnicodeStringToBytes(CurrentDirectory + Chr(0)))
Result = CreateProcessWithLogonW(wUser, wDomain, wPassword, CREATE_DEFAULT_ERROR_MODE, 0&, wCommandLine, CREATE_NEW_CONSOLE, 0&, wCurrentDir, si, pi)
If Result <> 0 Then
CloseHandle(pi.hThread)
CloseHandle(pi.hProcess)
W2KRunAsUser = 0
Else
W2KRunAsUser = Err.LastDllError
Status = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, CType(0&, IntPtr), W2KRunAsUser, 0, strMessage, Len(strMessage), 0)
MsgBox("CreateProcessWithLogonW() failed with error: " & W2KRunAsUser & " " & strMessage, vbExclamation)
End If
Please remember that my target administrator user is only resident on the PC I'm running the application on - not on the domain. I've verified that I can login with the credentials and run DeviceCleanupCmd.exe with success. In order to login locally, I must use a \ before the user. When I run the code, I've attempted the following, with the error message that Windows 10 supplies after the colon (:):
Providing "user", "password", and "domain" (I know it's not required): The directory name is invalid.
Providing "user", "password", and domain as "": The directory name is invalid.
Providing "\user", "password", and domain as "": The directory name is invalid.
Providing ".\user", "password", and domain as "": The stub received bad data.
Providing "user", "password", and domain as "computer name": The directory name is invalid.
Providing "non-admin user", "password", and "domain of user": DeviceCleanupCmd.exe runs but complains 'No admin privileges available'.
Because the application is complaining about an invalid directory name, I've purposely placed the DeviceCleanupCmd.exe in a C:\sub-directory that is not protected by Windows (Like Program Files). Attempt 6 above would seem to prove that there's not rights/access violations.
I have also tried CREATE_NEW_CONSOLE in place of CREATE_DEFAULT_ERROR_MODE and same results as above. I've proved the user is being decoded, as when I provide an incorrect password, I get "The user name or password is incorrect".
#Hurshey provided the insight to look at the Windows Task Scheduler and the following links support full configuring the task + incorporating the exported XML into NSIS - my target deployment method.
https://www.windowscentral.com/how-create-automated-task-using-task-scheduler-windows-10
https://nsis.sourceforge.io/Talk:Scheduled_Tasks
I upgrade my magento store to the last version, after this I can't reset the customer passsword in frontend, so:
I press on Forgot Your Password button
Complete with my email password and press Submit
In the received email I press on "RESET PASSWORD" button and I am redirected to the store and I have this error: Your password reset link has expired.
How I can solve this?
I had the same, but a second error message appeared
which said that a required field is not filled out.
In general: when anything goes wrong when saving the customer,
the said error message "Your password reset link has expired" shows up.
So, pay attention to any additional error messages showing up or in your log files.
If you want to find out what's happening in detail,
go to the file
"app/code/core/Mage/Customer/controllers/AccountController.php"
and modify the method resetPasswordPostAction temporarily.
Inside the } catch (Exception $exception) { directive, add Mage::logException($e);.
After you have seen the error again,
you can find the real error message in the file var/log/exception.log.
Ref Link: https://magento.stackexchange.com/questions/84605/magento-reset-password-link-not-working-after-upgrade
Hope this will help you!!
I am trying to manage user permissions
I know that if I want to grant a particular user Publish and Browse (PermissionIds U,F) I would do this:
contentService.AssignContentPermission(node, 'U', userId);
contentService.AssignContentPermission(node, 'F', userId);
but if the user already had those permissions and I want to remove Publish and grant 'Send to Publish' (H) how do I remove the existing Publish permission for that user/node combo?
I tried:
contentService.AssignContentPermission(node, '-', userId);
but this didn't seem to work.
looks like it's best to assign the permissions using the ApplicationContext.Current.Services.UserService
get all applicatble nodes (a single one in my case) and permissions and call
userService.ReplaceUserPermissions(user.Id, permissions, nodes);
When I try to log in while I'm already logged in, wicket gives me a LoginException; Additional Logins are not allowed. This makes sense of course.
What I want to do, is invalidate the session if there is already a user logged in, and log in in the same event.
if (((AuthenticatedWebSession) getSession()).isUserAuthenticated()) {
((AuthenticatedWebSession) getSession()).invalidateNow();
}
((AuthenticatedWebSession) getSession()).login(secureLoginContext);
It seems invalidateNow is completed after the onSubmit event, because Wicket still gives me the same LoginException.
Any ideas how to make this work?
Why do you want to log in again? Are you trying to log in with different credentials?
I have once written a panel where a user (already logged in) could log in as another user if he had sufficient rights. I ran into a similar problem and fixed it by forcing wicket to make a new session with ThreadContext.setSession(null).
So you code would become:
if (((AuthenticatedWebSession) getSession()).isUserAuthenticated()) {
((AuthenticatedWebSession) getSession()).invalidateNow();
ThreadContext.setSession(null);
}
((AuthenticatedWebSession) getSession()).login(secureLoginContext);