Apache Guacamole connection reason input field - guacamole

Is there an easy way to add an additional field to the login page, where the reason for connecting to Guacamole?
Didn't try anything.

Related

HTTP Redirect on a browser without showing intermediate window

I have two servers someserver.com and anotherserver.com
What I need is when a user clicks on someserver.com he or she will be redirected to anotherserver.com
Currently when I do a redirect programatically on the server (ASP.NET MVC IIS)
what a user see is: 1) someserver.com is loaded 2)anotherserver.com is loaded.
What i want is when a user clicks on someserver.com he sees only anotherserver.com in his browser.
Does http protocol allow it?
Thanks!
There are a bunch of approaches to this but the simplest one of you own the domain is to just use domain forwarding st the dns level. Then it won't involve your web server at all. Otherwise, the browser will always have to load the first site, if only briefly, before loading the second one. You can optimize this by just sending a redirect, which should be barely noticeable. Another option would be client-side JavaScript, but if you know on the client that you want to go to the new URL, you could just use a standard hyperlink to it at that point (so I assume this is not an option).

How can I tell if my connection is using SSL?

I'm using code from a demo program using Devart's MyDac component using Delphi 2009 to connect to a remote database using SSL.
I have made and verified the certificates and keys and set the connection parameters in MyDAC to use them eg
MyConnection.protocol := 'mpSSL';
MyConnection.SSLOptions.CACert := 'C:\ca-cert.pem';
MyConnection.SSLOptions.Cert := 'C:\client-cert.pem';
MyConnection.SSLOptions.Key := 'C:\client-key.pem';
MyConnection.SSLOptions.Chipherlist := 'All';
When I tell MyConnection to connect (after setting the user name / password etc) it connects to the database with no problems.
However as a test I deliberately put in an invalid key name of 'C:\XXXclient-key.pem and it still connected OK so maybe it wasn't using SSL at all.
So my question is:
How can I use Delphi to detect if a connection is really using SSL or not?
I think I'll close this question myself as it seem far more complex than I thought it was and I need much more information before this question makes sense. It appears that the sql statement;
SHOW STATUS LIKE 'Ssl_cipher'
can help as its value will be empty if its not using ssl or will contain an value if it is.
The touble was the Mysql server I was using (ISP Nativespace) did not even have a variable name called Ssl_cipher so it looks like it doesn't support ssl anyway. Trying the same thing using another ISP I did see the variable name but it had no value, showing that was also not using ssl even I though it could do it.
It now appears that there is much more that needs doing before a ssl connection can be set up. Creating a new user on the db that only ever uses ssl, setting up permissions for them, running code on the server etc.
Not at all as simple as Devart's web page on securebridge leads one to believe!
"It is enough to place several components on the form and specify the
server address and the user login information to establish a secure
connection."
Err... not quite!

.NET/sql exception on site

yesterday a client called and reported a problem while trying to access our website. He can open the index page but then every article on the page throws and sql exception and he get's a yellow page (yellow page of death)
Exception type: SqlException
Exception message: String or binary data would be truncated.
Now, I checked all blocking's on the server and on IIS and neither of them is blocking him or preventing from accessing page content. I tried logging in with his credentials and everything works fine, he also can log in from his home PC but just cant from his company network/PC.
I checked with his Internet Service Provider and they also allow all traffic, there are no proxy's or limitations for certain addresses or networks. Any idea what causes that?
Another thing I need to check today is...there was one version of mozilla/chrome which, if you select the autocomplete value for the username, it added some invisible chars and you had to retype for ex. the username again and mustn't select it from the textbox as autocomplete.
Edit: The client doesn't need to logged in, he just cant open any article on the site, whether authenticated or not. But every article he is trying to open I can, like the rest of out client's
String or binary data would be truncated
Your application is trying to insert something in the database and the text writen is larger than the column size defined in your database.

Connect to Sun LDAP with ADO

I want to connect (and get user's group) to a Sun LDAP server with a Delphi program.
I think ADSI works only with Microsoft LDAP. I try it with ADO, but I can't connect.
Can someone show some code how I would do this?
I think this code will fit the bill.
There is more to ADSI than just LDAP, and from my experience it is easier to use LDAP client to connect to ActiveDirectory than the other way around - which is what you are trying to do, unfortunatly.
To get you started, here is a fail safe way to authenticate a user.
Establish a connection with your LDAP server with your service account. If possible, use the LDAP protocol over SSL, LDAPS
Search for the username (wich is the CN=jdoe part) to get the full DN (distinguished name)
If you have duplicate result, stop here with an error
Bind to the LDAP with the DN and password you are trying to validate. Make shure you are using the same validation method on both side.
If it binds, the password is valid.
Close the connection you just established
Depending on your needs, either hold on to the connection you made a step 1 or tear it down, too.

Forms submitting twice in Struts 2, Hibernate application behing a network proxy

I have a struts2, Hibernate and Spring application. It works properly at our local end. When we deploy the application on the development server sometimes some forms are submitted twice on form submission. This is causing duplicate data to be entered in the database.
This is happening only on server. This is happening rarely on Firefox but very frequently in IE. And again this happens on only some forms and not on other forms. There is nothing to differentiate those forms though.
We have sometimes used struts 2 submit button to submit forms and sometimes used java script with simple buttons to submit the form.
As a last way we can use interceptor to prevent double forms submission (We will have to make changes to lot of forms) but the point is its not happening at local end at all. Why its happening on server only and that too on some forms and sometimes only.
EDIT:
The other thing I noticed is that when I use no network proxy then even on server form is not submitted twice but when a network proxy is used, the form is submitted twice. The app works fine without any proxy properly. No duplicates at all.
What proxies has to do with it? Has anyone encountered any such issues with network proxy and double form submission?
EDIT2:
Just now I have found out that while using proxy sometimes access is denied in that case post request is sent twice by the browser resulting in double form submission.
If I see the http header I can see two post requests with one of them having following in headers
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the the request. Access to the Web Proxy service is denied. )
Any ideas about this?
Please help.
If you use jsp and use
<html:submit .... onClick="some javascript code">
you might try to use
<html:button .... onClick=:some javascript code" >
The condition happened to me was
I use "form" tag in my jsp page
I use additional button inside the form tag, which is using javascript that submit the form
Hope it would help.

Resources