Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] Custom URI are deleted on subsequent edit

Hexabit GmbH March 15, 2018

Problem Description

We have a custom URL protocol (hxcrypt://) which launches an application on our side. First it works, but on a subsequent edit of this page, the <a ... /> tag is still there, but the href attribute is missing.

Do we need to register the URL somewhere in the system?

 

Failed Workarounds

  • Not setting a link name
  • Link inside or outside of a table
  • Escaping the hash in the url

 

Steps to Reproduce

Create a Web Link on a page with the following parameters:

URL: hxcrypt://eyJTYWx0IjoiM0V5dC9hc2IyWENVVzFIOEFSRTVueDdiTjdDeEEwT254YUE5ZFhjWFlMa1FPTkVLVlVwYWdscXFDcDBEWHV2dE41dERNM01OU1NLRkhkYUFMbjVicFE9PSIsIkNyeXB0b0hhc2giOiJxTUk2Z1g3NnAvZ1NUUjdqUUlZam13PT0ifQ==

Name: Test

Save the page. Then edit the page, change something in the document, then save again. The web link is now broken.

 

Version Information

Confluence-Version6.0.4
Build-Nummer7102

 

BetriebssystemLinux 3.16.0-4-amd64
Betriebssystemarchitekturamd64
AnwendungsserverApache Tomcat/8.0.39
Servlet-Version3.1
Java-Version1.8.0_112
Java-HerstellerOracle Corporation
JVM-Version1.8
JVM-HerstellerOracle Corporation
JVM-Implementierungsversion25.112-b15
Java RuntimeJava(TM) SE Runtime Environment
Java VMJava HotSpot(TM) 64-Bit Server VM
Java-Laufzeitargumente-Djava.util.logging.config.file=/home/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/home/atlassian/confluence/logs/gc-2017-11-09_18-53-39.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Djava.endorsed.dirs=/home/atlassian/confluence/endorsed -Dcatalina.base=/home/atlassian/confluence -Dcatalina.home=/home/atlassian/confluence -Djava.io.tmpdir=/home/atlassian/confluence/temp

 

DatenbanknamePostgreSQL
Datenbankversion9.4.10
Datenbankdialektnet.sf.hibernate.dialect.PostgreSQLDialect
Name des Datenbanktreibersorg.postgresql.Driver
Version des DatenbanktreibersPostgreSQL 9.4.1212
URL für Datenbankverbindungjdbc:postgresql://localhost:5432/confluence
Transaktionsisolation für DatenbankverbindungRead committed
Datenbank-Wartezeit0


Thank you in advance!

luetm

 

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2018

Are your users using plain text or the link option?  How have you customised the link option to understand the new non-standard protocol?

0 votes
Hexabit GmbH March 15, 2018

We use the 'Link' button in the toolbar. I did not have to customize anything on the JIRA/Confluence side. The protocol is registered in the Windows Registry and works with a custom application we developed.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2018

Ok.  Confluence does not recognise that as a valid link, so it does not save it as a link.  That's why I asked what you had customised, because you need to hack the code in confluence to tell it that this should be treated as a link.

Hexabit GmbH March 16, 2018

That's not entirely true. The first time around, it works and it recognizes the link as valid. When I save, everything works, the click launchers our software, everthing perfect. But, when I go on to edit the page again at some later time, the link will be gone.

Is it possible to tell confluence, that the hxcrypt:// protocol is valid?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2018

You would have to hack the code.

The reason that it seems valid at first until edited is probably that the "create link" code has been written to accept anything without validation because users may post invalid stuff.  Editing is expected to put valid things in.

Hexabit GmbH March 16, 2018

OK. I'll look if I can find a plugin that lets me put plain HTML in there, then it should work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events