[jira] [Assigned] (GUACAMOLE-526) Update Guacamole-Client Webapp to Angular 1.6.9

2018-03-13 Thread James Muehlner (JIRA)

 [ 
https://issues.apache.org/jira/browse/GUACAMOLE-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Muehlner reassigned GUACAMOLE-526:


Assignee: James Muehlner

> Update Guacamole-Client Webapp to Angular 1.6.9
> ---
>
> Key: GUACAMOLE-526
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-526
> Project: Guacamole
>  Issue Type: Improvement
>Reporter: James Muehlner
>Assignee: James Muehlner
>Priority: Minor
>
> The client webapp is currently running AngularJS version 1.3.16, which is 
> about 3 years old.
> Upgrading to the new typescript-based Angular would be a very involved 
> change, but we should at least attempt to upgrade to the most recent version 
> of AngularJS, 1.6.9.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-441) guacd ssh plugin segfault when copy text to clipboard

2018-03-13 Thread James He (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397867#comment-16397867
 ] 

James He commented on GUACAMOLE-441:


Thank you. I'll see if I can fix my Ubuntu to generate a core dump.

Please try to generate more text (e.g. cat a long file) in the ssh window. When 
you select all the text in the window, hold the mouse left key and scroll down 
the ssh window with the mouse wheel, so that you can select more text out of 
the current view.

> guacd ssh plugin segfault when copy text to clipboard
> -
>
> Key: GUACAMOLE-441
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-441
> Project: Guacamole
>  Issue Type: Bug
>  Components: SSH
>Affects Versions: 0.9.13-incubating
> Environment: GNU Linux x86_64
>Reporter: James He
>Priority: Minor
>
> This segfault can be replicated each time when do the below steps.
> - Login to any SSH server from guacamole.
> - Try a command with much output e.g. "ps aux".
> - Select the output text of the above command.
> - SSH connection will be terminated immediately.
> - Core dump of guacd will be generated.
> {code:none}
> Core was generated by `/sbin/guacd -f'.
> Program terminated with signal SIGABRT, Aborted.
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> #1  0x2bca9818 in abort () from /lib64/libc.so.6
> #2  0x2bce6574 in ?? () from /lib64/libc.so.6
> #3  0x2bcebdae in ?? () from /lib64/libc.so.6
> #4  0x2bcecab6 in ?? () from /lib64/libc.so.6
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> #6  0x2db6b2b5 in guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921, mask=0)
> at terminal.c:1753
> #7  0x2db5c532 in guac_ssh_user_mouse_handler (user=0x2aaab0002920, 
> x=703, y=921, mask=0) at input.c:41
> #8  0x2af4dc2e in __guac_handle_mouse (user=0x2aaab0002920, argc=3, 
> argv=0x2aaab000adc0)
> at user-handlers.c:134
> #9  0x2af4d3ea in guac_user_handle_instruction (user=0x2aaab0002920, 
> opcode=0x2aaab0012b29 "mouse", argc=3,
> argv=0x2aaab000adc0) at user.c:178
> #10 0x004055e7 in guacd_user_input_thread (data=0x2f353d20) at 
> user.c:127
> #11 0x2b8521a4 in start_thread (arg=0x2aab0d029700) at 
> pthread_create.c:309
> #12 0x2bd5965d in clone () from /lib64/libc.so.6
> (gdb) frame 5
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> warning: Source file is more recent than executable.
> 1715guac_common_clipboard_reset(term->clipboard, 
> "text/plain");
> (gdb) p term->clipboard->length
> $6 = 9500
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-525) Creating user results in "Incorrect syntax near 'LIMIT'"

2018-03-13 Thread Nick Couchman (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397729#comment-16397729
 ] 

Nick Couchman commented on GUACAMOLE-525:
-

{quote}
Accessing them by name only really works if you're passing in an object as a 
parameter and not when you're passing primitive types.
{quote}

Fortunately I turned out to be wrong about this.

I think I have a solution that works - at least, I'm able to successfully 
manage password history with it, and can see overall user history.  Pull 
request momentarily.

> Creating user results in "Incorrect syntax near 'LIMIT'"
> 
>
> Key: GUACAMOLE-525
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-525
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
> Environment: MSSQL 2012
>Reporter: Tommy Larsen
>Assignee: Nick Couchman
>Priority: Major
>
> New installation with 0.9.14 authenticating against MSSQL server 2012.  
> guacamole_db set to compatibility mode "SQL Server 2005 (90)".
> No problem logging in as guacadmin, but when trying to create a user, I get 
> "Incorrect syntax near 'LIMIT'".  Validation of the query shown in 
> catalina.out by debugging in SQL management studio confirms the error.
> The list of keywords for MSSQL server 2008 and newer does not include LIMIT.
> Catalina.out error message:
> {code:none}
> 10:59:06.579 [http-nio-8080-exec-9] ERROR o.a.g.rest.RESTExceptionWrapper - 
> Unexpected internal error:
> ### Error querying database.  Cause: 
> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 
> 'LIMIT'.
> ### The error may exist in 
> org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: SELECT [guacamole_user_password_history].user_id,
>  [guacamole_user_password_history].password_hash, 
> [guacamole_user_password_history].password_salt, 
> [guacamole_user_password_history].password_date FROM 
> [guacamole_user_password_history] JOIN [guacamole_user] ON 
> [guacamole_user_password_history].user_id = [guacamole_user].user_id 
> WHERE [guacamole_user].username = ? ORDER BY 
> [guacamole_user_password_history].password_date DESC LIMIT ?
> ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax 
> near 'LIMIT'.
> Mar 12, 2018 10:59:06 AM com.sun.jersey.spi.container.ContainerResponse 
> logException
> SEVERE: Mapped exception to response: 500 (Internal Server Error)
> org.apache.guacamole.rest.APIException
>     at 
> org.apache.guacamole.rest.RESTExceptionWrapper.invoke(RESTExceptionWrapper.java:202)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>     at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
>     at 
> 

[jira] [Assigned] (GUACAMOLE-525) Creating user results in "Incorrect syntax near 'LIMIT'"

2018-03-13 Thread Nick Couchman (JIRA)

 [ 
https://issues.apache.org/jira/browse/GUACAMOLE-525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Couchman reassigned GUACAMOLE-525:
---

Assignee: Nick Couchman

> Creating user results in "Incorrect syntax near 'LIMIT'"
> 
>
> Key: GUACAMOLE-525
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-525
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
> Environment: MSSQL 2012
>Reporter: Tommy Larsen
>Assignee: Nick Couchman
>Priority: Major
>
> New installation with 0.9.14 authenticating against MSSQL server 2012.  
> guacamole_db set to compatibility mode "SQL Server 2005 (90)".
> No problem logging in as guacadmin, but when trying to create a user, I get 
> "Incorrect syntax near 'LIMIT'".  Validation of the query shown in 
> catalina.out by debugging in SQL management studio confirms the error.
> The list of keywords for MSSQL server 2008 and newer does not include LIMIT.
> Catalina.out error message:
> {code:none}
> 10:59:06.579 [http-nio-8080-exec-9] ERROR o.a.g.rest.RESTExceptionWrapper - 
> Unexpected internal error:
> ### Error querying database.  Cause: 
> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 
> 'LIMIT'.
> ### The error may exist in 
> org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: SELECT [guacamole_user_password_history].user_id,
>  [guacamole_user_password_history].password_hash, 
> [guacamole_user_password_history].password_salt, 
> [guacamole_user_password_history].password_date FROM 
> [guacamole_user_password_history] JOIN [guacamole_user] ON 
> [guacamole_user_password_history].user_id = [guacamole_user].user_id 
> WHERE [guacamole_user].username = ? ORDER BY 
> [guacamole_user_password_history].password_date DESC LIMIT ?
> ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax 
> near 'LIMIT'.
> Mar 12, 2018 10:59:06 AM com.sun.jersey.spi.container.ContainerResponse 
> logException
> SEVERE: Mapped exception to response: 500 (Internal Server Error)
> org.apache.guacamole.rest.APIException
>     at 
> org.apache.guacamole.rest.RESTExceptionWrapper.invoke(RESTExceptionWrapper.java:202)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>     at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
>     at 
> 

[jira] [Commented] (GUACAMOLE-441) guacd ssh plugin segfault when copy text to clipboard

2018-03-13 Thread Nick Couchman (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397693#comment-16397693
 ] 

Nick Couchman commented on GUACAMOLE-441:
-

{quote}
Anyway, I just built guacd from the latest code in github and tried the steps 
in description. The SSH connection stopped immediately. So the problem is still 
there.
{quote}

I've tried this with an 0.9.13-incubating version (probably not the actual 
release, but in between that and 0.9.14 release) that I have running, and with 
the current git master, and I cannot reproduce the behavior following the steps 
you posted above.  I'm running on CentOS 7 instead of Ubuntu.

Can you post the stack trace on the most recent core dump?

> guacd ssh plugin segfault when copy text to clipboard
> -
>
> Key: GUACAMOLE-441
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-441
> Project: Guacamole
>  Issue Type: Bug
>  Components: SSH
>Affects Versions: 0.9.13-incubating
> Environment: GNU Linux x86_64
>Reporter: James He
>Priority: Minor
>
> This segfault can be replicated each time when do the below steps.
> - Login to any SSH server from guacamole.
> - Try a command with much output e.g. "ps aux".
> - Select the output text of the above command.
> - SSH connection will be terminated immediately.
> - Core dump of guacd will be generated.
> {code:none}
> Core was generated by `/sbin/guacd -f'.
> Program terminated with signal SIGABRT, Aborted.
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> #1  0x2bca9818 in abort () from /lib64/libc.so.6
> #2  0x2bce6574 in ?? () from /lib64/libc.so.6
> #3  0x2bcebdae in ?? () from /lib64/libc.so.6
> #4  0x2bcecab6 in ?? () from /lib64/libc.so.6
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> #6  0x2db6b2b5 in guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921, mask=0)
> at terminal.c:1753
> #7  0x2db5c532 in guac_ssh_user_mouse_handler (user=0x2aaab0002920, 
> x=703, y=921, mask=0) at input.c:41
> #8  0x2af4dc2e in __guac_handle_mouse (user=0x2aaab0002920, argc=3, 
> argv=0x2aaab000adc0)
> at user-handlers.c:134
> #9  0x2af4d3ea in guac_user_handle_instruction (user=0x2aaab0002920, 
> opcode=0x2aaab0012b29 "mouse", argc=3,
> argv=0x2aaab000adc0) at user.c:178
> #10 0x004055e7 in guacd_user_input_thread (data=0x2f353d20) at 
> user.c:127
> #11 0x2b8521a4 in start_thread (arg=0x2aab0d029700) at 
> pthread_create.c:309
> #12 0x2bd5965d in clone () from /lib64/libc.so.6
> (gdb) frame 5
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> warning: Source file is more recent than executable.
> 1715guac_common_clipboard_reset(term->clipboard, 
> "text/plain");
> (gdb) p term->clipboard->length
> $6 = 9500
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-441) guacd ssh plugin segfault when copy text to clipboard

2018-03-13 Thread James He (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397676#comment-16397676
 ] 

James He commented on GUACAMOLE-441:


Sure. Because it's on a production system. I have a ubuntu Linux 16.04 running 
the latest guacamole for test. But I cannot make it to generate a core dump 
file. Anyway, I just built guacd from the latest code in github and tried the 
steps in description. The SSH connection stopped immediately. So the problem is 
still there.

> guacd ssh plugin segfault when copy text to clipboard
> -
>
> Key: GUACAMOLE-441
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-441
> Project: Guacamole
>  Issue Type: Bug
>  Components: SSH
>Affects Versions: 0.9.13-incubating
> Environment: GNU Linux x86_64
>Reporter: James He
>Priority: Minor
>
> This segfault can be replicated each time when do the below steps.
> - Login to any SSH server from guacamole.
> - Try a command with much output e.g. "ps aux".
> - Select the output text of the above command.
> - SSH connection will be terminated immediately.
> - Core dump of guacd will be generated.
> {code:none}
> Core was generated by `/sbin/guacd -f'.
> Program terminated with signal SIGABRT, Aborted.
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> #1  0x2bca9818 in abort () from /lib64/libc.so.6
> #2  0x2bce6574 in ?? () from /lib64/libc.so.6
> #3  0x2bcebdae in ?? () from /lib64/libc.so.6
> #4  0x2bcecab6 in ?? () from /lib64/libc.so.6
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> #6  0x2db6b2b5 in guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921, mask=0)
> at terminal.c:1753
> #7  0x2db5c532 in guac_ssh_user_mouse_handler (user=0x2aaab0002920, 
> x=703, y=921, mask=0) at input.c:41
> #8  0x2af4dc2e in __guac_handle_mouse (user=0x2aaab0002920, argc=3, 
> argv=0x2aaab000adc0)
> at user-handlers.c:134
> #9  0x2af4d3ea in guac_user_handle_instruction (user=0x2aaab0002920, 
> opcode=0x2aaab0012b29 "mouse", argc=3,
> argv=0x2aaab000adc0) at user.c:178
> #10 0x004055e7 in guacd_user_input_thread (data=0x2f353d20) at 
> user.c:127
> #11 0x2b8521a4 in start_thread (arg=0x2aab0d029700) at 
> pthread_create.c:309
> #12 0x2bd5965d in clone () from /lib64/libc.so.6
> (gdb) frame 5
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> warning: Source file is more recent than executable.
> 1715guac_common_clipboard_reset(term->clipboard, 
> "text/plain");
> (gdb) p term->clipboard->length
> $6 = 9500
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (GUACAMOLE-505) Individual user query fails after two or more login history entries exist

2018-03-13 Thread Nick Couchman (JIRA)

 [ 
https://issues.apache.org/jira/browse/GUACAMOLE-505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Couchman resolved GUACAMOLE-505.
-
Resolution: Fixed

PR has been merged into git master.

> Individual user query fails after two or more login history entries exist
> -
>
> Key: GUACAMOLE-505
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-505
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
>Reporter: Michael Jumper
>Assignee: Nick Couchman
>Priority: Blocker
> Fix For: 1.0.0
>
>
> [As reported on the mailing 
> lists|https://lists.apache.org/thread.html/4bec430479b0363f55d471c7f9ed395dc536fc5aece012f3a39ed104@%3Cuser.guacamole.apache.org%3E],
>  the SQL Server extension currently fails after any particular user has 
> logged in two or more times. This is due to [a stray {{LEFT JOIN}} within the 
> "selectOne" query specific to SQL 
> Server|https://github.com/apache/guacamole-client/blob/1e1679e5cea0df69b26e7d78ff10e59f15d124e2/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml#L201]:
> {code:xml}
> 
> 
> SELECT
> [guacamole_user].user_id,
> [guacamole_user].username,
> password_hash,
> password_salt,
> password_date,
> disabled,
> expired,
> access_window_start,
> access_window_end,
> valid_from,
> valid_until,
> timezone,
> full_name,
> email_address,
> organization,
> organizational_role,
> (
> SELECT MAX(start_date)
> FROM [guacamole_user_history]
> WHERE [guacamole_user_history].user_id = 
> [guacamole_user].user_id
> ) AS last_active
> FROM [guacamole_user]
> LEFT JOIN [guacamole_user_history] ON 
> [guacamole_user_history].user_id = [guacamole_user].user_id
> WHERE
> [guacamole_user].username = #{username,jdbcType=VARCHAR}
> 
> {code}
> This {{LEFT JOIN}} should have been removed as part of commit 
> [394a289|https://github.com/apache/guacamole-client/commit/394a289879dba9273f976a9174ad4eec45b674c2].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[2/2] guacamole-client git commit: GUACAMOLE-505: Merge changes fixing the behavior SQL Server version of the "selectOne" query for retrieval of user account information (the query must return at most

2018-03-13 Thread mjumper
GUACAMOLE-505: Merge changes fixing the behavior SQL Server version of the 
"selectOne" query for retrieval of user account information (the query must 
return at most one row).


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/a6579ce4
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/a6579ce4
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/a6579ce4

Branch: refs/heads/master
Commit: a6579ce4e1c70ea436fa1acc26a9ce2bb1e7fe84
Parents: b8a5f0b d3dcd84
Author: Michael Jumper 
Authored: Tue Mar 13 12:47:10 2018 -0700
Committer: Michael Jumper 
Committed: Tue Mar 13 12:47:10 2018 -0700

--
 .../org/apache/guacamole/auth/jdbc/user/UserMapper.xml  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--




[1/2] guacamole-client git commit: GUACAMOLE-505: Remove stray left join in SQL Server UserMapper.

2018-03-13 Thread mjumper
Repository: guacamole-client
Updated Branches:
  refs/heads/master b8a5f0bd2 -> a6579ce4e


GUACAMOLE-505: Remove stray left join in SQL Server UserMapper.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/d3dcd843
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/d3dcd843
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/d3dcd843

Branch: refs/heads/master
Commit: d3dcd84379eb0c49b2af5341215c5784ac4ed628
Parents: b8a5f0b
Author: Nick Couchman 
Authored: Tue Mar 13 10:47:31 2018 -0400
Committer: Nick Couchman 
Committed: Tue Mar 13 10:47:31 2018 -0400

--
 .../org/apache/guacamole/auth/jdbc/user/UserMapper.xml  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/d3dcd843/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
--
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
index e9c5b02..177ab93 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
@@ -176,8 +176,8 @@
 resultSets="users,arbitraryAttributes">
 
 SELECT
-[guacamole_user].user_id,
-[guacamole_user].username,
+user_id,
+username,
 password_hash,
 password_salt,
 password_date,
@@ -198,7 +198,6 @@
 WHERE [guacamole_user_history].user_id = 
[guacamole_user].user_id
 ) AS last_active
 FROM [guacamole_user]
-LEFT JOIN [guacamole_user_history] ON [guacamole_user_history].user_id 
= [guacamole_user].user_id
 WHERE
 [guacamole_user].username = #{username,jdbcType=VARCHAR};
 



[jira] [Commented] (GUACAMOLE-441) guacd ssh plugin segfault when copy text to clipboard

2018-03-13 Thread Michael Jumper (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397473#comment-16397473
 ] 

Michael Jumper commented on GUACAMOLE-441:
--

{quote}
But I cannot update my guacamole instance for some reason.
{quote}

Can you elaborate on this?

> guacd ssh plugin segfault when copy text to clipboard
> -
>
> Key: GUACAMOLE-441
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-441
> Project: Guacamole
>  Issue Type: Bug
>  Components: SSH
>Affects Versions: 0.9.13-incubating
> Environment: GNU Linux x86_64
>Reporter: James He
>Priority: Minor
>
> This segfault can be replicated each time when do the below steps.
> - Login to any SSH server from guacamole.
> - Try a command with much output e.g. "ps aux".
> - Select the output text of the above command.
> - SSH connection will be terminated immediately.
> - Core dump of guacd will be generated.
> {code:none}
> Core was generated by `/sbin/guacd -f'.
> Program terminated with signal SIGABRT, Aborted.
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> #1  0x2bca9818 in abort () from /lib64/libc.so.6
> #2  0x2bce6574 in ?? () from /lib64/libc.so.6
> #3  0x2bcebdae in ?? () from /lib64/libc.so.6
> #4  0x2bcecab6 in ?? () from /lib64/libc.so.6
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> #6  0x2db6b2b5 in guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921, mask=0)
> at terminal.c:1753
> #7  0x2db5c532 in guac_ssh_user_mouse_handler (user=0x2aaab0002920, 
> x=703, y=921, mask=0) at input.c:41
> #8  0x2af4dc2e in __guac_handle_mouse (user=0x2aaab0002920, argc=3, 
> argv=0x2aaab000adc0)
> at user-handlers.c:134
> #9  0x2af4d3ea in guac_user_handle_instruction (user=0x2aaab0002920, 
> opcode=0x2aaab0012b29 "mouse", argc=3,
> argv=0x2aaab000adc0) at user.c:178
> #10 0x004055e7 in guacd_user_input_thread (data=0x2f353d20) at 
> user.c:127
> #11 0x2b8521a4 in start_thread (arg=0x2aab0d029700) at 
> pthread_create.c:309
> #12 0x2bd5965d in clone () from /lib64/libc.so.6
> (gdb) frame 5
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> warning: Source file is more recent than executable.
> 1715guac_common_clipboard_reset(term->clipboard, 
> "text/plain");
> (gdb) p term->clipboard->length
> $6 = 9500
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-441) guacd ssh plugin segfault when copy text to clipboard

2018-03-13 Thread James He (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397466#comment-16397466
 ] 

James He commented on GUACAMOLE-441:


Thanks for looking at this bug. I understand your concern. But I cannot update 
my guacamole instance for some reason. Did you get a chance to try the simple 
steps I mentioned in the bug description? The problem can be easily duplicated.

> guacd ssh plugin segfault when copy text to clipboard
> -
>
> Key: GUACAMOLE-441
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-441
> Project: Guacamole
>  Issue Type: Bug
>  Components: SSH
>Affects Versions: 0.9.13-incubating
> Environment: GNU Linux x86_64
>Reporter: James He
>Priority: Minor
>
> This segfault can be replicated each time when do the below steps.
> - Login to any SSH server from guacamole.
> - Try a command with much output e.g. "ps aux".
> - Select the output text of the above command.
> - SSH connection will be terminated immediately.
> - Core dump of guacd will be generated.
> {code:none}
> Core was generated by `/sbin/guacd -f'.
> Program terminated with signal SIGABRT, Aborted.
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x2bca8437 in raise () from /lib64/libc.so.6
> #1  0x2bca9818 in abort () from /lib64/libc.so.6
> #2  0x2bce6574 in ?? () from /lib64/libc.so.6
> #3  0x2bcebdae in ?? () from /lib64/libc.so.6
> #4  0x2bcecab6 in ?? () from /lib64/libc.so.6
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> #6  0x2db6b2b5 in guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921, mask=0)
> at terminal.c:1753
> #7  0x2db5c532 in guac_ssh_user_mouse_handler (user=0x2aaab0002920, 
> x=703, y=921, mask=0) at input.c:41
> #8  0x2af4dc2e in __guac_handle_mouse (user=0x2aaab0002920, argc=3, 
> argv=0x2aaab000adc0)
> at user-handlers.c:134
> #9  0x2af4d3ea in guac_user_handle_instruction (user=0x2aaab0002920, 
> opcode=0x2aaab0012b29 "mouse", argc=3,
> argv=0x2aaab000adc0) at user.c:178
> #10 0x004055e7 in guacd_user_input_thread (data=0x2f353d20) at 
> user.c:127
> #11 0x2b8521a4 in start_thread (arg=0x2aab0d029700) at 
> pthread_create.c:309
> #12 0x2bd5965d in clone () from /lib64/libc.so.6
> (gdb) frame 5
> #5  0x2db6b160 in __guac_terminal_send_mouse (term=0x2aaab401bf60, 
> user=0x2aaab0002920, x=703, y=921,
> mask=0) at terminal.c:1715
> warning: Source file is more recent than executable.
> 1715guac_common_clipboard_reset(term->clipboard, 
> "text/plain");
> (gdb) p term->clipboard->length
> $6 = 9500
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-168) Add support for X.Org

2018-03-13 Thread Rick Leir (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397320#comment-16397320
 ] 

Rick Leir commented on GUACAMOLE-168:
-

My experience is with NoMachine NX client, connecting to a server across town. 
Response was snappy! Better than what I have seen of RDP. So I will be happy if 
we can get NX communications into Guac.

cheers – Rick

> Add support for X.Org
> -
>
> Key: GUACAMOLE-168
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-168
> Project: Guacamole
>  Issue Type: New Feature
>  Components: guacamole-client, guacamole-server
>Reporter: Michael Jumper
>Assignee: Michael Jumper
>Priority: Major
>
> It's been frequently requested that we add support for a more efficient 
> protocol like NX or X2Go. Though that sounds nice on the surface, and 
> theoretically would allow us to leverage some of Guacamole's nicer 
> protocol-level features, investigating deeper reveals:
> # X2Go *is* NX - it uses the same protocol behind the scenes.
> # NX isn't really a protocol - it is essentially a compressor for X11, and 
> depends on the client having a local X11 server to handle the decompressed 
> result.
> Implementing support for either of these would thus involve implementing 
> support for X11, which is crazy. *However:*
> What about implementing a driver for the X.Org X11 server?
> The X.Org server provides a driver abstraction layer which exposes access to 
> windows (including their hierarchy) and pixmaps, much in the same way the 
> Guacamole protocol provides nestable layers and buffers. If we were to 
> implement a Guacamole driver for X.Org, we would be able to make much greater 
> use Guacamole protocol features like client-side compositing. Operations 
> which are typically expensive in VNC or RDP like window movement suddenly 
> become simple, as they only involve updating the properties of a layer.
> I have an experimental implementation of all this, built upon several other 
> improvements which ended up being required. Work started several years ago, 
> even before Guacamole was accepted into the Apache Incubator, but I think 
> it's finally ready to move forward. I've been using it myself for roughly a 
> month now, and so far so good.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GUACAMOLE-525) Creating user results in "Incorrect syntax near 'LIMIT'"

2018-03-13 Thread Nick Couchman (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397312#comment-16397312
 ] 

Nick Couchman commented on GUACAMOLE-525:
-

...and it just keeps getting better.  Using "TOP" re-arranges the order of 
parameters into the SELECT statement, which messes up the query.  Accessing 
them by name (#{maxHistorySize}) only really works if you're passing in an 
object as a parameter and not when you're passing primitive types.  If you're 
passing in Primitive types, only the order is evaluated.

> Creating user results in "Incorrect syntax near 'LIMIT'"
> 
>
> Key: GUACAMOLE-525
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-525
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
> Environment: MSSQL 2012
>Reporter: Tommy Larsen
>Priority: Major
>
> New installation with 0.9.14 authenticating against MSSQL server 2012.  
> guacamole_db set to compatibility mode "SQL Server 2005 (90)".
> No problem logging in as guacadmin, but when trying to create a user, I get 
> "Incorrect syntax near 'LIMIT'".  Validation of the query shown in 
> catalina.out by debugging in SQL management studio confirms the error.
> The list of keywords for MSSQL server 2008 and newer does not include LIMIT.
> Catalina.out error message:
> {code:none}
> 10:59:06.579 [http-nio-8080-exec-9] ERROR o.a.g.rest.RESTExceptionWrapper - 
> Unexpected internal error:
> ### Error querying database.  Cause: 
> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 
> 'LIMIT'.
> ### The error may exist in 
> org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: SELECT [guacamole_user_password_history].user_id,
>  [guacamole_user_password_history].password_hash, 
> [guacamole_user_password_history].password_salt, 
> [guacamole_user_password_history].password_date FROM 
> [guacamole_user_password_history] JOIN [guacamole_user] ON 
> [guacamole_user_password_history].user_id = [guacamole_user].user_id 
> WHERE [guacamole_user].username = ? ORDER BY 
> [guacamole_user_password_history].password_date DESC LIMIT ?
> ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax 
> near 'LIMIT'.
> Mar 12, 2018 10:59:06 AM com.sun.jersey.spi.container.ContainerResponse 
> logException
> SEVERE: Mapped exception to response: 500 (Internal Server Error)
> org.apache.guacamole.rest.APIException
>     at 
> org.apache.guacamole.rest.RESTExceptionWrapper.invoke(RESTExceptionWrapper.java:202)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>     at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
>     at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
>     at 
> 

[jira] [Commented] (GUACAMOLE-525) Creating user results in "Incorrect syntax near 'LIMIT'"

2018-03-13 Thread Nick Couchman (JIRA)

[ 
https://issues.apache.org/jira/browse/GUACAMOLE-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397087#comment-16397087
 ] 

Nick Couchman commented on GUACAMOLE-525:
-

{quote}
The list of keywords for MSSQL server 2008 and newer does not include LIMIT.
{quote}
{quote}
This saddens me.
{quote}



It gets better:

https://stackoverflow.com/questions/971964/limit-10-20-in-sql-server

Apparently the support for various work-arounds is spotty, too - some of them 
only work in 2005 or newer, some in 2012.  This is going to make it so much fun 
to come up with a solution that works across different TSQL-type databases and 
different versions.

Looks like it impacts password history and user history.  I initially wasn't 
able to reproduce the issue because I didn't have password history enabled - it 
wasn't until I looked closer at the error that I saw that's where it occurred 
during user creation.

> Creating user results in "Incorrect syntax near 'LIMIT'"
> 
>
> Key: GUACAMOLE-525
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-525
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
> Environment: MSSQL 2012
>Reporter: Tommy Larsen
>Priority: Major
>
> New installation with 0.9.14 authenticating against MSSQL server 2012.  
> guacamole_db set to compatibility mode "SQL Server 2005 (90)".
> No problem logging in as guacadmin, but when trying to create a user, I get 
> "Incorrect syntax near 'LIMIT'".  Validation of the query shown in 
> catalina.out by debugging in SQL management studio confirms the error.
> The list of keywords for MSSQL server 2008 and newer does not include LIMIT.
> Catalina.out error message:
> {code:none}
> 10:59:06.579 [http-nio-8080-exec-9] ERROR o.a.g.rest.RESTExceptionWrapper - 
> Unexpected internal error:
> ### Error querying database.  Cause: 
> com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 
> 'LIMIT'.
> ### The error may exist in 
> org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: SELECT [guacamole_user_password_history].user_id,
>  [guacamole_user_password_history].password_hash, 
> [guacamole_user_password_history].password_salt, 
> [guacamole_user_password_history].password_date FROM 
> [guacamole_user_password_history] JOIN [guacamole_user] ON 
> [guacamole_user_password_history].user_id = [guacamole_user].user_id 
> WHERE [guacamole_user].username = ? ORDER BY 
> [guacamole_user_password_history].password_date DESC LIMIT ?
> ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax 
> near 'LIMIT'.
> Mar 12, 2018 10:59:06 AM com.sun.jersey.spi.container.ContainerResponse 
> logException
> SEVERE: Mapped exception to response: 500 (Internal Server Error)
> org.apache.guacamole.rest.APIException
>     at 
> org.apache.guacamole.rest.RESTExceptionWrapper.invoke(RESTExceptionWrapper.java:202)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>     at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>     at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
>     at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>     at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>     at 
> 

[jira] [Assigned] (GUACAMOLE-505) Individual user query fails after two or more login history entries exist

2018-03-13 Thread Nick Couchman (JIRA)

 [ 
https://issues.apache.org/jira/browse/GUACAMOLE-505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Couchman reassigned GUACAMOLE-505:
---

Assignee: Nick Couchman

> Individual user query fails after two or more login history entries exist
> -
>
> Key: GUACAMOLE-505
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-505
> Project: Guacamole
>  Issue Type: Bug
>  Components: guacamole-auth-jdbc-sqlserver
>Affects Versions: 0.9.14
>Reporter: Michael Jumper
>Assignee: Nick Couchman
>Priority: Blocker
> Fix For: 1.0.0
>
>
> [As reported on the mailing 
> lists|https://lists.apache.org/thread.html/4bec430479b0363f55d471c7f9ed395dc536fc5aece012f3a39ed104@%3Cuser.guacamole.apache.org%3E],
>  the SQL Server extension currently fails after any particular user has 
> logged in two or more times. This is due to [a stray {{LEFT JOIN}} within the 
> "selectOne" query specific to SQL 
> Server|https://github.com/apache/guacamole-client/blob/1e1679e5cea0df69b26e7d78ff10e59f15d124e2/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml#L201]:
> {code:xml}
> 
> 
> SELECT
> [guacamole_user].user_id,
> [guacamole_user].username,
> password_hash,
> password_salt,
> password_date,
> disabled,
> expired,
> access_window_start,
> access_window_end,
> valid_from,
> valid_until,
> timezone,
> full_name,
> email_address,
> organization,
> organizational_role,
> (
> SELECT MAX(start_date)
> FROM [guacamole_user_history]
> WHERE [guacamole_user_history].user_id = 
> [guacamole_user].user_id
> ) AS last_active
> FROM [guacamole_user]
> LEFT JOIN [guacamole_user_history] ON 
> [guacamole_user_history].user_id = [guacamole_user].user_id
> WHERE
> [guacamole_user].username = #{username,jdbcType=VARCHAR}
> 
> {code}
> This {{LEFT JOIN}} should have been removed as part of commit 
> [394a289|https://github.com/apache/guacamole-client/commit/394a289879dba9273f976a9174ad4eec45b674c2].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)